diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-24 10:32:26 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-24 10:32:26 +0000 |
commit | e6e4a21b991c9f51b42b992fc4137791ea08c987 (patch) | |
tree | 8465bfab2dbeab063ab425f7afb8bd807f4db47e /crawl-ref/source/util/levcomp.lpp | |
parent | c1d6a946fbdb5eff8571675cece333e87a9b9d07 (diff) | |
download | crawl-ref-e6e4a21b991c9f51b42b992fc4137791ea08c987.tar.gz crawl-ref-e6e4a21b991c9f51b42b992fc4137791ea08c987.zip |
Allow : prefixed Lua lines in .des files.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1634 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/levcomp.lpp')
-rw-r--r-- | crawl-ref/source/util/levcomp.lpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp index 401403ac0d..4cc718855a 100644 --- a/crawl-ref/source/util/levcomp.lpp +++ b/crawl-ref/source/util/levcomp.lpp @@ -68,6 +68,7 @@ static void settext(bool trim_right = false, int strip_trailing = 0) %x MAPDEF %x LUA +%x LUA_ONELINER %s ARGUMENT %s MNAME %s KEYWORDS @@ -103,7 +104,13 @@ NSPACE [^\ \t\r\n] settext(); return LUA_LINE; } -<LUA>\r?\n ; +<LUA>\r?\n ; + +<LUA_ONELINER>[^\r\n]+$ { + settext(); + return LUA_LINE; + } +<LUA_ONELINER>\r?\n { BEGIN(INITIAL); } <KEYWORDS>[A-Za-z_0-9\-]+ { settext(); @@ -149,6 +156,7 @@ NSPACE [^\ \t\r\n] ^\s*MAP { BEGIN(MAPDEF); } +^: { BEGIN(LUA_ONELINER); return MAIN; } ^prelude[ \t]*\{\{ { BEGIN(LUA); return PRELUDE; } ^lua[ \t]*\{\{ { BEGIN(LUA); return MAIN; } |