public ImportPackageAST ParseImport() { ImportPackageAST ast = new ImportPackageAST(); ast.KeyToken = CurrentToken; MoveNext(); //跳过"使用" MoveNext(); //跳过":" ast.Packages = parsePackageList(); matchSemiOrNewLine(); //match(TokenKind.Semi); return(ast); }
public FileAST() { MethodList = new List <MethodAST>(); PropertyList = new List <PropertyAST>(); AgreementList = new List <AgreementAST>(); ImportPackage = new ImportPackageAST() { KeyToken = new Token() { Col = 0, Line = 0, Kind = TokenKind.Ident, Text = "使用包" } }; }
public ImportAnalyer(ClassContext classContext, ImportPackageAST importList, SimpleUseAST simpleUse) { this.classContext = classContext; importPackage = importList; this.simpleUse = simpleUse; }