diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-03-02 11:02:06 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-25 17:50:12 +0000 |
commit | 70251c5ee7e2c96dac19e49b6ce69a55d78994a4 (patch) | |
tree | 330f295e7129151b28db5fbe22636c65963ec55c /src/qml/parser/qqmljsastfwd_p.h | |
parent | 19d3b7eb4c5fd806ea519771549df14ac965b79e (diff) |
Bring JS grammar in line with ES7 spec
This basically updates all grammar rules in the
qqmljs.g file to be in line with the ES7 specification.
Some special handling for the lookahead rules appearing
in the spec was needed and is implemented through empty
lookahead rules in the grammar, that might push an
additional token into the token stream.
Renamed some classes in the AST to be in line with
the names used in ES7, and removed some other ones
(SourceElements) that are no longer used.
The ES7 grammar rules contain lots of variations of
the base rules (with In/Return/Yield/Default suffixes).
With the exception of the In and Default rules, these
are implemented through state tracking in the parser
and lexer.
Change-Id: I4017d97cd050ed816c1dad11833e882cba30801a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsastfwd_p.h')
-rw-r--r-- | src/qml/parser/qqmljsastfwd_p.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qml/parser/qqmljsastfwd_p.h b/src/qml/parser/qqmljsastfwd_p.h index 7a8bdf1b63..89245f4884 100644 --- a/src/qml/parser/qqmljsastfwd_p.h +++ b/src/qml/parser/qqmljsastfwd_p.h @@ -97,7 +97,7 @@ class ArrayLiteral; class ObjectLiteral; class ElementList; class Elision; -class PropertyAssignmentList; +class PropertyDefinitionList; class PropertyGetterSetter; class PropertyNameAndValue; class PropertyName; @@ -156,14 +156,12 @@ class Finally; class FunctionDeclaration; class FunctionExpression; class FormalParameterList; -class FunctionBody; class Program; -class SourceElements; -class SourceElement; -class FunctionSourceElement; -class StatementSourceElement; class DebuggerStatement; class NestedExpression; +class BindingPattern; +class ArrayBindingPattern; +class ObjectBindingPattern; class BindingElement; class BindingElementList; class BindingPropertyList; |