Skip to content

Commit a7b436f

Browse files
committed
loosen parser furthre
1 parent 3e7580a commit a7b436f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/transpiler/parser/scheme-parser.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,9 @@ export class SchemeParser implements Parser {
275275
token.literal as string
276276
);
277277
default:
278-
// if in a quoting context, any keyword is instead treated as a symbol
279-
if (this.quoteMode !== QuoteMode.NONE) {
278+
// if in a quoting context, or when dealing with the macro chapter,
279+
// any keyword is instead treated as a symbol
280+
if (this.quoteMode !== QuoteMode.NONE || this.chapter >= MACRO_CHAPTER) {
280281
return new Atomic.Symbol(this.toLocation(token), token.lexeme);
281282
}
282283
throw new ParserError.UnexpectedFormError(

0 commit comments

Comments
 (0)