public virtual void WriteBaseVisitor(Template outputFileST, bool header) { AbstractTarget target = GetTarget(); if (target == null) { throw new NotSupportedException("Cannot generate code without a target."); } target.GenFile(g, outputFileST, GetBaseVisitorFileName(header)); }
public virtual void WriteVocabFile() { AbstractTarget target = GetTarget(); if (target == null) { throw new NotSupportedException("Cannot generate code without a target."); } // write out the vocab interchange file; used by ANTLR, // does not change per target Template tokenVocabSerialization = GetTokenVocabOutput(); string fileName = GetVocabFileName(); if (fileName != null) { target.GenFile(g, tokenVocabSerialization, fileName); } }