diff --git a/src/Parser.hs b/src/Parser.hs index 140ec282f..5da7a4ce2 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -146,6 +146,7 @@ javascriptTermConstructor source sourceSpan name range children = withDefaultInf ("ternary", (condition:cases)) -> S.Ternary condition cases ("arguments", _) -> S.Args children ("var_assignment", [ x, y ]) -> S.VarAssignment x y + ("var_declaration", _) -> S.Indexed $ toVarDecl <$> children (_, []) -> S.Leaf . toText $ slice range source _ -> S.Indexed children where withDefaultInfo = pure . cofree . ((range .: categoryForJavaScriptProductionName name .: RNil) :<)