* @throws TemplateException
*/
private Variable scope(ExprData data,Identifier id, Position line) throws TemplateException {
String idStr=id.getUpper();
if(data.ignoreScopes)return null;
if (idStr.equals("CGI")) return new Variable(Scope.SCOPE_CGI,line,data.cfml.getPosition());
else if (idStr.equals("ARGUMENTS")) return new Variable(Scope.SCOPE_ARGUMENTS,line,data.cfml.getPosition());
else if (idStr.equals("REQUEST")) return new Variable(Scope.SCOPE_REQUEST,line,data.cfml.getPosition());
else if (idStr.equals("SESSION")) return new Variable(Scope.SCOPE_SESSION,line,data.cfml.getPosition());
else if (idStr.equals("APPLICATION")) return new Variable(Scope.SCOPE_APPLICATION,line,data.cfml.getPosition());
else if (idStr.equals("VARIABLES")) return new Variable(Scope.SCOPE_VARIABLES,line,data.cfml.getPosition());
else if (idStr.equals("FORM")) return new Variable(Scope.SCOPE_FORM,line,data.cfml.getPosition());
else if (idStr.equals("URL")) return new Variable(Scope.SCOPE_URL,line,data.cfml.getPosition());
else if (idStr.equals("SERVER")) return new Variable(Scope.SCOPE_SERVER,line,data.cfml.getPosition());
else if (idStr.equals("CLIENT")) return new Variable(Scope.SCOPE_CLIENT,line,data.cfml.getPosition());
else if (idStr.equals("COOKIE")) return new Variable(Scope.SCOPE_COOKIE,line,data.cfml.getPosition());
else if (idStr.equals("CLUSTER")) return new Variable(Scope.SCOPE_CLUSTER,line,data.cfml.getPosition());
else if (idStr.equals("LOCAL")) return new Variable(Scope.SCOPE_LOCAL,line,data.cfml.getPosition());
else if (idStr.equals("VAR")) {
Identifier _id = identifier(data,false,true);
if(_id!=null){
comments(data);
Variable local = new Variable(ScopeSupport.SCOPE_VAR,line,data.cfml.getPosition());
if(!"LOCAL".equalsIgnoreCase(_id.getString()))local.addMember(new DataMember(_id));
else {
local.ignoredFirstMember(true);
}
return local;
}
}
return null;