mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
parse_tree: Remove Pratt parser
It isn't actually needed; the way we parse expressions as a prefix followed by zero or more suffixes is enough.
This commit is contained in:
parent
9fcb63a013
commit
8874cf60b3
3 changed files with 6 additions and 68 deletions
|
@ -23,7 +23,7 @@ from .types import TypeName
|
|||
from .gtkbuilder_template import Template
|
||||
|
||||
|
||||
expr = Pratt()
|
||||
expr = Sequence()
|
||||
|
||||
|
||||
class Expr(AstNode):
|
||||
|
@ -200,9 +200,6 @@ class ClosureExpr(Expr):
|
|||
|
||||
|
||||
expr.children = [
|
||||
Prefix(ClosureExpr),
|
||||
Prefix(IdentExpr),
|
||||
Prefix(["(", ExprChain, ")"]),
|
||||
Infix(10, LookupOp),
|
||||
Infix(10, CastExpr),
|
||||
AnyOf(ClosureExpr, IdentExpr, ["(", ExprChain, ")"]),
|
||||
ZeroOrMore(AnyOf(LookupOp, CastExpr)),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue