public static Module ParseModule(int tabSize, CompileUnit cu, string readerName, TextReader reader, ParserErrorHandler errorHandler) { if (Readers.IsEmpty(reader)) { var emptyModule = new Module(new LexicalInfo(readerName), CodeFactory.ModuleNameFrom(readerName)); cu.Modules.Add(emptyModule); return(emptyModule); } var module = CreateParser(tabSize, readerName, reader, errorHandler).start(cu); module.Name = CodeFactory.ModuleNameFrom(readerName); return(module); }
public static Module ParseModule(ParserSettings settings, CompileUnit cu, string readerName, TextReader reader) { if (Readers.IsEmpty(reader)) { var emptyModule = new Module(new LexicalInfo(readerName), CodeFactory.ModuleNameFrom(readerName)); cu.Modules.Add(emptyModule); return(emptyModule); } var module = CreateParser(settings, readerName, reader).start(cu); module.Name = CodeFactory.ModuleNameFrom(readerName); return(module); }
private static string ModuleNameFrom(string readerName) { return(CodeFactory.ModuleNameFrom(readerName)); }