private void initialise(GingerToken type, Variable name, ImportList il, FunctionList fl) { _type = type; add(name); add(il); add(fl); }
private ImportList parseImportList() { ImportList il = new ImportList(); while (currentScannerToken == GingerToken.Import) { nextScannerToken(); if (currentScannerToken == GingerToken.Identifier) { //il.add(new Import(new Identifier(scanner.row, scanner.col, new string(scanner.tokenValue)))); il.add(new Import(parseIdentifier(false))); } else { throw new ParseException(scanner.row, scanner.col, $"Expected '{GingerToken.Identifier.ToString()}', found '{currentScannerToken.ToString()}'", ExceptionLevel.ERROR); } nextScannerToken(); } return(il); }
public Component(GingerToken type, Variable name, ImportList il, FunctionList fl, Identifier extends) : base() { initialise(type, name, il, fl); add(extends); }
public Component(GingerToken type, Variable name, ImportList il, FunctionList fl) : base() { initialise(type, name, il, fl); }