示例#1
0
        public List <Token> Scan(ContextFile fileContext, ZFileModel fileModel)
        {
            List <Token> Tokens    = new List <Token>();
            List <Token> preTokens = ScanPreCode(fileModel.ZFileInfo.FilePreText, fileContext);

            Tokens.AddRange(preTokens);

            List <Token> fileTokens = ScanFileCode(fileContext, fileModel);

            Tokens.AddRange(fileTokens);
            return(Tokens);
        }
示例#2
0
        private List <Token> ScanFileCode(ContextFile fileContext, ZFileModel fileModel)
        {
            if (fileModel.ZFileInfo.IsVirtual)
            {
                return(new List <Token> ());
            }
            string           srcFile = fileModel.ZFileInfo.RealFilePath;// zCompileClassModel.GetSrcFullPath();
            FileSourceReader reader  = new FileSourceReader(srcFile);
            List <Token>     tokens2 = ScanReaderTokens(reader, fileContext);

            return(tokens2);
        }
示例#3
0
        public FileType Parse(ZFileModel fileModel)
        {
            ContextFile       fileContext   = new ContextFile(this.projectContext, fileModel);
            List <Token>      Tokens        = Scan(fileContext, fileModel);
            FileSectionParser parser        = new FileSectionParser();
            FileMutilType     fileMutilType = parser.Parse(Tokens, fileContext);
            FileType          fileType      = ParseSingleMutil(fileMutilType);

            fileType.FileModel      = fileModel;
            fileType.ProjectContext = this.projectContext;
            return(fileType);
        }
示例#4
0
 public void AddClass(ZFileModel zCompileClassModel)
 {
     //zCompileClassModel.Project = this;
     SouceFileList.Add(zCompileClassModel);
 }