Fixed bug on call tag scope check. Added keyword duplicate check to Tag processing.
This commit is contained in:
parent
069fb9c9f3
commit
858d073d63
3
Tag.cpp
3
Tag.cpp
@ -50,7 +50,10 @@ namespace jet {
|
|||||||
if(!finished) {
|
if(!finished) {
|
||||||
coreutils::ZString keywordName = in.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
|
coreutils::ZString keywordName = in.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
|
||||||
if(in.ifNext("=\"")) {
|
if(in.ifNext("=\"")) {
|
||||||
|
if(variables.count(keywordName) == 0)
|
||||||
variables[keywordName] = in.getTokenExclude("\"");
|
variables[keywordName] = in.getTokenExclude("\"");
|
||||||
|
else
|
||||||
|
throw coreutils::Exception("keyword name must be unique for tag.");
|
||||||
}
|
}
|
||||||
if(!in.ifNext("\"")) {}
|
if(!in.ifNext("\"")) {}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ namespace jet {
|
|||||||
close(fdo[1]);
|
close(fdo[1]);
|
||||||
if(variableDefined("name")) {
|
if(variableDefined("name")) {
|
||||||
resolveKeyword("name");
|
resolveKeyword("name");
|
||||||
if(!variableDefined("scope") && (variables["scope"] == "global"))
|
if(!variableDefined("scope") || (variables["scope"] == "global"))
|
||||||
global.variables[variables["name"]].read(fdo[0]);
|
global.variables[variables["name"]].read(fdo[0]);
|
||||||
else if(variables["scope"] == "local")
|
else if(variables["scope"] == "local")
|
||||||
parent->variables[variables["name"]].read(fdo[0]);
|
parent->variables[variables["name"]].read(fdo[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user