summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.lpp
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 20:09:38 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 20:09:38 +0000
commit42c0cf066213e022a8f1f0ea4230b668095c605b (patch)
tree792728ce498a6c6160a9cba6cd49f86ed3c4d887 /crawl-ref/source/util/levcomp.lpp
parent82cc08db3375be0e6ab3b871f7dde5916ed67c30 (diff)
downloadcrawl-ref-42c0cf066213e022a8f1f0ea4230b668095c605b.tar.gz
crawl-ref-42c0cf066213e022a8f1f0ea4230b668095c605b.zip
Lua marker code is now converted into an anonymous function in the same scope as the rest of the map Lua code so that locals defined in the map Lua are visible to the marker code.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7479 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/levcomp.lpp')
-rw-r--r--crawl-ref/source/util/levcomp.lpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp
index 42297b5016..590cd59122 100644
--- a/crawl-ref/source/util/levcomp.lpp
+++ b/crawl-ref/source/util/levcomp.lpp
@@ -122,7 +122,6 @@ static void cattext(bool trim_right = false, int strip_trailing = 0)
%s MNAME
%s KEYWORDS
%x ITEM_LIST
-%x TOEOL
%option yylineno
%option never-interactive
@@ -213,19 +212,9 @@ SPACE [\ \t\r]
cattext();
}
-<ARGUMENT>{SPACE}*$ { BEGIN(INITIAL); str_check(); return STRING; }
-
-<TOEOL>.*\\[ \t\r]*$ {
- settext(true, 1);
- return STRING;
- }
+<ARGUMENT>{NSPACE} cattext();
-<TOEOL>.+$ {
- BEGIN(INITIAL);
- settext(true);
- return STRING;
- }
-<TOEOL>\r?\n ;
+<ARGUMENT>{SPACE}*$ { BEGIN(INITIAL); str_check(); return STRING; }
^[ \t]*#.* ;
@@ -259,7 +248,7 @@ FLOORCOL: { CBEGIN(ARGUMENT); return FLOORCOL; }
ROCKCOL: { CBEGIN(ARGUMENT); return ROCKCOL; }
MONS: { CBEGIN(MNAME); return MONS; }
ITEM: { CBEGIN(ITEM_LIST); return ITEM; }
-MARKER: { CBEGIN(TOEOL); return MARKER; }
+MARKER: { CBEGIN(ARGUMENT); return MARKER; }
SHUFFLE: { CBEGIN(ITEM_LIST); return SHUFFLE; }
KFEAT: { CBEGIN(ARGUMENT); return KFEAT; }