mirror of https://github.com/ZDoom/qzdoom.git
Added #region / #endregion handling (should affect all text lumps, let me know if there are text lumps unaffected by this).
This commit is contained in:
parent
4b0aac9816
commit
1ba526d4de
|
@ -55,6 +55,8 @@ std2:
|
||||||
/*!re2c
|
/*!re2c
|
||||||
"/*" { goto comment; } /* C comment */
|
"/*" { goto comment; } /* C comment */
|
||||||
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
||||||
|
("#region"|"#endregion") (any\"\n")* "\n"
|
||||||
|
{ goto newline; } /* Region blocks [mxd] */
|
||||||
|
|
||||||
(["](([\\]["])|[^"])*["]) { RET(TK_StringConst); }
|
(["](([\\]["])|[^"])*["]) { RET(TK_StringConst); }
|
||||||
'stop' { RET(TK_Stop); }
|
'stop' { RET(TK_Stop); }
|
||||||
|
@ -80,6 +82,8 @@ std2:
|
||||||
/*!re2c
|
/*!re2c
|
||||||
"/*" { goto comment; } /* C comment */
|
"/*" { goto comment; } /* C comment */
|
||||||
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
||||||
|
("#region"|"#endregion") (any\"\n")* "\n"
|
||||||
|
{ goto newline; } /* Region blocks [mxd] */
|
||||||
|
|
||||||
/* C Keywords */
|
/* C Keywords */
|
||||||
'break' { RET(TK_Break); }
|
'break' { RET(TK_Break); }
|
||||||
|
@ -269,6 +273,8 @@ std2:
|
||||||
/*!re2c
|
/*!re2c
|
||||||
"/*" { goto comment; } /* C comment */
|
"/*" { goto comment; } /* C comment */
|
||||||
("//"|";") (any\"\n")* "\n" { goto newline; } /* C++/Hexen comment */
|
("//"|";") (any\"\n")* "\n" { goto newline; } /* C++/Hexen comment */
|
||||||
|
("#region"|"#endregion") (any\"\n")* "\n"
|
||||||
|
{ goto newline; } /* Region blocks [mxd] */
|
||||||
|
|
||||||
WSP+ { goto std1; } /* whitespace */
|
WSP+ { goto std1; } /* whitespace */
|
||||||
"\n" { goto newline; }
|
"\n" { goto newline; }
|
||||||
|
@ -287,6 +293,8 @@ std2:
|
||||||
/*!re2c
|
/*!re2c
|
||||||
"/*" { goto comment; } /* C comment */
|
"/*" { goto comment; } /* C comment */
|
||||||
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
||||||
|
("#region"|"#endregion") (any\"\n")* "\n"
|
||||||
|
{ goto newline; } /* Region blocks [mxd] */
|
||||||
|
|
||||||
WSP+ { goto std1; } /* whitespace */
|
WSP+ { goto std1; } /* whitespace */
|
||||||
"\n" { goto newline; }
|
"\n" { goto newline; }
|
||||||
|
|
Loading…
Reference in New Issue