preprocessor.cxx

changeset 66
4fc1ec88aa41
parent 48
976c57f153b3
equal deleted inserted replaced
65:ec04357f5bb9 66:4fc1ec88aa41
102 // Read characters until next whitespace to 102 // Read characters until next whitespace to
103 // build the name of the directive 103 // build the name of the directive
104 str directive = PPReadWord (trash); 104 str directive = PPReadWord (trash);
105 105
106 // Now check the directive name against known names 106 // Now check the directive name against known names
107 if (!directive.icompare ("include")) { 107 if (directive == "include") {
108 // #include-directive 108 // #include-directive
109 char terminator; 109 char terminator;
110 str file = PPReadWord (terminator); 110 str file = PPReadWord (terminator);
111 111
112 if (!file.len()) 112 if (!file.len())
113 ParserError ("expected file name for #include, got nothing instead"); 113 ParserError ("expected file name for #include, got nothing instead");
114 OpenFile (file); 114 OpenFile (file);
115 return true; 115 return true;
116 } else if (directive == "neurosphere") {
117 // #neurosphere - activates neurosphere compatibility, aka stuff
118 // that is still WIP and what main zandronum does not yet support.
119 // Most end users should never need this.
120 g_Neurosphere = true;
121 return true;
116 } 122 }
117 123
118 ParserError ("unknown directive `#%s`!", directive.chars()); 124 ParserError ("unknown directive `#%s`!", directive.chars());
119 return false; 125 return false;
120 } 126 }

mercurial