We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd23de commit a887ea6Copy full SHA for a887ea6
src/lang2/parser/Parser.test.ts
@@ -13,7 +13,11 @@ import {
13
type Sexp = string | Array<Sexp>
14
15
function parseSexp(tokens: Array<Token>): ParserResult<Sexp> {
16
- return choose<Sexp>([literal("identifier"), parseList])(tokens)
+ return choose<Sexp>([parseSymbol, parseList])(tokens)
17
+}
18
+
19
+function parseSymbol(tokens: Array<Token>): ParserResult<string> {
20
+ return literal("identifier")(tokens)
21
}
22
23
function parseList(tokens: Array<Token>): ParserResult<Array<Sexp>> {
0 commit comments