rename hash literals to pound literals in code

This commit is contained in:
Lobo Torres 2024-12-05 12:52:02 -03:00
parent afa2589672
commit b767928130

View file

@ -84,7 +84,7 @@ export fn lex(lex: *lexer) (token | io::EOF | error) = {
return symbol{ v = v, kw = true };
};
case '#' =>
return scanhash(lex)?;
return scanpound(lex)?;
case '"' =>
return scanstr(lex)?;
case =>
@ -210,12 +210,12 @@ fn scanstr(lex: *lexer) (str | error) = {
return memio::string(&lex.strbuf)!;
};
fn scanhash(lex: *lexer) (token | error) = {
fn scanpound(lex: *lexer) (token | error) = {
const rn = match (nextrune(lex)?) {
case let rn: rune =>
yield rn;
case io::EOF =>
return ("hash literal", lex.loc.0, lex.loc.1): unterminated;
return ("pound literal", lex.loc.0, lex.loc.1): unterminated;
};
switch (rn) {