Add ability to get current script context

closes #277
This commit is contained in:
Jason Turner
2016-10-13 20:42:09 -06:00
parent fac8f3ec90
commit c97a69537d
5 changed files with 114 additions and 28 deletions

View File

@@ -31,7 +31,8 @@ namespace chaiscript
{
static const std::set<std::string> m_reserved_words
= {"def", "fun", "while", "for", "if", "else", "&&", "||", ",", "auto",
"return", "break", "true", "false", "class", "attr", "var", "global", "GLOBAL", "_"};
"return", "break", "true", "false", "class", "attr", "var", "global", "GLOBAL", "_",
"__LINE__", "__FILE__", "__FUNC__", "__CLASS__"};
return m_reserved_words.count(name) > 0;
}