示例#1
0
        public ImportPackageAST ParseImport()
        {
            ImportPackageAST ast = new ImportPackageAST();

            ast.KeyToken = CurrentToken;
            MoveNext();           //跳过"使用"
            MoveNext();           //跳过":"
            ast.Packages = parsePackageList();
            matchSemiOrNewLine(); //match(TokenKind.Semi);
            return(ast);
        }
示例#2
0
 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 = "使用包"
         }
     };
 }
示例#3
0
 public ImportAnalyer(ClassContext classContext, ImportPackageAST importList, SimpleUseAST simpleUse)
 {
     this.classContext = classContext;
     importPackage     = importList;
     this.simpleUse    = simpleUse;
 }