Lines Matching refs:Token
20 | [< 'Token.Number n >] -> Ast.Number n
23 | [< 'Token.Kwd '('; e=parse_expr; 'Token.Kwd ')' ?? "expected ')'" >] -> e
28 | [< 'Token.Ident id; stream >] ->
32 | [< 'Token.Kwd ','; e=parse_args (e :: accumulator) >] -> e
39 | [< 'Token.Kwd '(';
41 'Token.Kwd ')' ?? "expected ')'">] ->
50 | [< 'Token.If; c=parse_expr;
51 'Token.Then ?? "expected 'then'"; t=parse_expr;
52 'Token.Else ?? "expected 'else'"; e=parse_expr >] ->
57 | [< 'Token.For;
58 'Token.Ident id ?? "expected identifier after for";
59 'Token.Kwd '=' ?? "expected '=' after for";
64 'Token.Kwd ',' ?? "expected ',' after for";
69 | [< 'Token.Kwd ','; step=parse_expr >] -> Some step
74 | [< 'Token.In; body=parse_expr >] ->
90 | [< 'Token.Kwd op when op != '(' && op != ')'; operand=parse_expr >] ->
101 | Some (Token.Kwd c) when Hashtbl.mem binop_precedence c ->
116 | Some (Token.Kwd c2) ->
143 | [< 'Token.Ident id; e=parse_args (id::accumulator) >] -> e
147 | [< 'Token.Unary >] -> "unary", 1
148 | [< 'Token.Binary >] -> "binary", 2
151 | [< 'Token.Number n >] -> int_of_float n
155 | [< 'Token.Ident id;
156 'Token.Kwd '(' ?? "expected '(' in prototype";
158 'Token.Kwd ')' ?? "expected ')' in prototype" >] ->
162 'Token.Kwd op ?? "expected an operator";
165 'Token.Kwd '(' ?? "expected '(' in prototype";
167 'Token.Kwd ')' ?? "expected ')' in prototype" >] ->
184 | [< 'Token.Def; p=parse_prototype; e=parse_expr >] ->
195 | [< 'Token.Extern; e=parse_prototype >] -> e