public pStatus Parse(string line, int linenumber) { if (!isComment(line)) { pStatus result = currentBlock.Parse(line, linenumber); while (result == pStatus.Finished) { foreach (KeyValuePair<int, Function> pair in currentBlock.startLines) { startLines[pair.Key] = pair.Value; } currentBlock = new BlockParser(databases, manager); result=currentBlock.Parse(line, linenumber); } } return pStatus.Working; }
/// <summary> /// Preforms some stuff that needs to be done in between code parsing and class parsing. /// The things are: /// *Calling Class Database index checking func /// </summary> public void prepareForSecondStage() { databases.cdtb.doIndexChecking(); //2 ms foreach (KeyValuePair<int, Function> pair in currentBlock.startLines) { startLines[pair.Key] = pair.Value; } currentBlock = null; }
public Parser() { databases = Databases.getDefault(); currentBlock = new BlockParser(databases, manager); }