Update Parser.hx

now enum parses correctly
This commit is contained in:
Jaime Humberto Macias Bustamante
2025-07-24 14:18:45 -07:00
parent ed78ed79d9
commit 2c6f48b1bc
+3 -3
View File
@@ -284,7 +284,7 @@ class Parser {
function isBlock(e:Expr):Bool {
if( e == null ) return false;
return switch( expr(e) ) {
case EBlock(_), EObject(_), ESwitch(_): true;
case EBlock(_), EObject(_), ESwitch(_), EEnum(_, _): true;
case EFunction(_,e,_,_,_,_): isBlock(e);
case EClass(_,e,_,_): true;
case EVar(_, t, e, _,_): e != null ? isBlock(e) : t != null ? t.match(CTAnon(_)) : false;
@@ -1112,10 +1112,10 @@ class Parser {
var fields:Array<EnumField> = [];
var fieldName:String = '';
var enumArgs:Array<Argument> = null;
var tk = token();
//var tk = token();
while(!maybe(TBrClose)) {
tk = token();
var tk = token();
switch(tk) {
//case TBrClose: