Skip to content

Commit a726f89

Browse files
committed
Use Pascal case for enums in the tokenizer test
Although the rest of the compiler switched to Pascal case, this small test didn't. This equally small fix makes the test work again (instead of spamming "Identifier").
1 parent 85707fd commit a726f89

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/tokenizer.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
77

88
const file = process.argv.length > 2 ? process.argv[2] : path.join(dirname, "..", "src", "tokenizer.ts");
99
const text = fs.readFileSync(file).toString();
10-
const source = new Source(SourceKind.ENTRY, "tokenizer.ts", text);
10+
const source = new Source(SourceKind.Entry, "tokenizer.ts", text);
1111
const tn = new Tokenizer(source);
1212

1313
do {
1414
const token = tn.next();
1515
const range = tn.range();
1616
process.stdout.write(Token[token] + " @ " + source.lineAt(range.start) + ":" + source.columnAt());
17-
if (token == Token.IDENTIFIER) {
17+
if (token == Token.Identifier) {
1818
process.stdout.write(" > " + tn.readIdentifier());
19-
} else if (token == Token.INTEGERLITERAL) {
19+
} else if (token == Token.IntegerLiteral) {
2020
process.stdout.write(" > " + tn.readInteger());
21-
} else if (token == Token.FLOATLITERAL) {
21+
} else if (token == Token.FloatLiteral) {
2222
process.stdout.write(" > " + tn.readFloat());
23-
} else if (token == Token.STRINGLITERAL) {
23+
} else if (token == Token.StringLiteral) {
2424
process.stdout.write(" > " + tn.readString());
25-
} else if (token == Token.ENDOFFILE) {
25+
} else if (token == Token.EndOfFile) {
2626
process.stdout.write("\n");
2727
break;
2828
} else {

0 commit comments

Comments
 (0)