rename hash literals to pound literals in code
This commit is contained in:
parent
afa2589672
commit
b767928130
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ export fn lex(lex: *lexer) (token | io::EOF | error) = {
|
||||||
return symbol{ v = v, kw = true };
|
return symbol{ v = v, kw = true };
|
||||||
};
|
};
|
||||||
case '#' =>
|
case '#' =>
|
||||||
return scanhash(lex)?;
|
return scanpound(lex)?;
|
||||||
case '"' =>
|
case '"' =>
|
||||||
return scanstr(lex)?;
|
return scanstr(lex)?;
|
||||||
case =>
|
case =>
|
||||||
|
@ -210,12 +210,12 @@ fn scanstr(lex: *lexer) (str | error) = {
|
||||||
return memio::string(&lex.strbuf)!;
|
return memio::string(&lex.strbuf)!;
|
||||||
};
|
};
|
||||||
|
|
||||||
fn scanhash(lex: *lexer) (token | error) = {
|
fn scanpound(lex: *lexer) (token | error) = {
|
||||||
const rn = match (nextrune(lex)?) {
|
const rn = match (nextrune(lex)?) {
|
||||||
case let rn: rune =>
|
case let rn: rune =>
|
||||||
yield rn;
|
yield rn;
|
||||||
case io::EOF =>
|
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) {
|
switch (rn) {
|
||||||
|
|
Loading…
Reference in a new issue