示例#1
0
 // Insert a file into this one
 // TODO: pass new input back up the tree
 public bool Include(string filename)
 {
     if (!File.Exists(filename))
     {
         return(false);
     }
     using (StreamReader sr = File.OpenText(filename)) {
         NewInput = new ParserInput {
             Filename = filename, InputText = sr.ReadToEnd(),
         };
         Symbols.FindIdent("$filename$").Value = TextValue.Create(filename);
     }
     return(true);
 }