diff --git a/grammar/declarations/object_instantiation.bnf b/grammar/declarations/object_instantiation.bnf new file mode 100644 index 0000000..c435f7b --- /dev/null +++ b/grammar/declarations/object_instantiation.bnf @@ -0,0 +1,3 @@ + ::= "new" "(" ? ")" + + ::= ["/" ]? diff --git a/grammar/main.bnf b/grammar/main.bnf index 3f792f9..3e916d1 100644 --- a/grammar/main.bnf +++ b/grammar/main.bnf @@ -16,6 +16,7 @@ import "core/visibility.bnf" import "core/modules.bnf" import "declarations/type_declarations.bnf" import "declarations/function_declarations.bnf" +import "declarations/object_instantiation.bnf" import "operations/expressions.bnf" import "operations/method_calls.bnf" import "operations/control_flow.bnf" diff --git a/grammar/operations/expressions.bnf b/grammar/operations/expressions.bnf index fc8122d..ce84c03 100644 --- a/grammar/operations/expressions.bnf +++ b/grammar/operations/expressions.bnf @@ -2,19 +2,30 @@ | | | + | | "(" ")" | - ::= - | "(" ")" - | .eq() - | .is() - | .not() - | .gt() - | .lt() - | .gte() - | .lte() - | Boolean.or(, ) - | Boolean.and(, ) + ::= + + | "(" ")" + | .eq() + | .is() + | .not() + | .gt() + | .lt() + | .gte() + | .lte() + | .and() + | .or() + | Boolean.and(, ) + | Boolean.or(, ) + | Boolean.not() + | Boolean.eq(, ) + | Boolean.is(, ) + | Boolean.gt(, ) + | Boolean.lt(, ) + | Boolean.gte(, ) + | Boolean.lte(, ) ::= ".define(" ")"