From d1968a5ba426ba5d202ff2824115b568de3f5f3f Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 28 Jun 2007 12:04:38 +0000 Subject: Updated level-design.txt with a basic overview of the Lua possibilities. Fixed some inconsistencies in the handling of Lua errors. Tweaked the lexer to allow spaces before Lua chunk prefixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1676 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/util/levcomp.lpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/util/levcomp.lpp') diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp index 96331e45d1..cf803cdc00 100644 --- a/crawl-ref/source/util/levcomp.lpp +++ b/crawl-ref/source/util/levcomp.lpp @@ -156,13 +156,13 @@ NSPACE [^\ \t\r\n] ^\s*MAP { BEGIN(MAPDEF); } -^: { BEGIN(LUA_ONELINER); return MAIN; } +^[ \t]*: { BEGIN(LUA_ONELINER); return MAIN; } -^prelude[ \t]*\{\{ { BEGIN(LUA); return PRELUDE; } -^lua[ \t]*\{\{ { BEGIN(LUA); return MAIN; } +^[ \t]*prelude[ \t]*\{\{ { BEGIN(LUA); return PRELUDE; } +^[ \t]*lua[ \t]*\{\{ { BEGIN(LUA); return MAIN; } ^[ \t]*\{\{ { BEGIN(LUA); return MAIN; } -^validate[ \t]*\{\{ { BEGIN(LUA); return VALIDATE; } -^veto[ \t]*\{\{ { BEGIN(LUA); return VETO; } +^[ \t]*validate[ \t]*\{\{ { BEGIN(LUA); return VALIDATE; } +^[ \t]*veto[ \t]*\{\{ { BEGIN(LUA); return VETO; } NAME: { BEGIN(ARGUMENT); return NAME; } -- cgit v1.2.3-54-g00ecf