public SQDeclaration Parse(ITextBuffer buffer, out bool isnewversion) { if (_instance == null) { _instance = new SQInstance(SquirrelVersion.Squirrel3); } isnewversion = false; string filepath = SQLanguageServiceEX.GetFileName(buffer); int version = _instance.GetVersion(filepath); SQDeclaration d = _instance.Parse(buffer, out isnewversion); if (d != null) { MapObjects(GetNode(filepath), d); } //RegisterError(isnewversion, d, filepath, null); return(d); }
public SQDeclaration Parse(string filepath) { if (_instance == null) { _instance = new SQInstance(SquirrelVersion.Squirrel3); } SQDeclaration d = null; bool newversion = false; if (File.Exists(filepath)) { string buffer = File.ReadAllText(filepath); d = _instance.Parse(buffer, filepath, out newversion); } if (d != null) { MapObjects(GetNode(filepath), d); //RegisterError(newversion, d, filepath, null); } return(d); }