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); }
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); }
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); }
public void AddClass(ZFileModel zCompileClassModel) { //zCompileClassModel.Project = this; SouceFileList.Add(zCompileClassModel); }