Created
April 25, 2012 16:09
-
-
Save NotFound/2490975 to your computer and use it in GitHub Desktop.
Testing dynamic lex with winxed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dynamic lex test | |
function main [main]() | |
{ | |
string lex[2]; | |
var dynlex = lex; | |
${ .lex "dynlex", dynlex }; | |
dynlex[0] = "main"; | |
test(); | |
say(dynlex); | |
test2(); | |
say(dynlex); | |
} | |
function test() | |
{ | |
var p0; | |
${ find_dynamic_lex p0, "dynlex" }; | |
p0[1] = "test"; | |
} | |
function test2() | |
{ | |
string p0[1] = [ "test2 rules" ]; | |
${ store_dynamic_lex "dynlex", p0 }; | |
} | |
// End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment