Exemple #1
0
 public void AddDefine(ICollection <string> defs)
 {
     foreach (string def in defs)
     {
         MacroDefines.Add(def, string.Empty);
     }
 }
Exemple #2
0
        public csLexerWithPreProcessor(ICharStream stream, IEnumerable <string> defines) : base(stream)
        {
            // By default we are preprocessing input
            Processing.Push(true);

            // Grab what's defined from the command line
            MacroDefines.UnionWith(defines);
        }
Exemple #3
0
        public PreProcessor()
        {
            // By default we are preprocessing input
            Processing.Push(true);

            // Grab what's defined from the command line
            string[] args = Environment.GetCommandLineArgs();
            for (int n = 0; n < args.Length; ++n)
            {
                if (args[n] == "-D")
                {
                    if ((n + 1) < args.Length)
                    {
                        MacroDefines.Add(args[n + 1], string.Empty);
                    }
                }
            }
        }
Exemple #4
0
 public void AddDefine(string def)
 {
     MacroDefines.Add(def, string.Empty);
 }