Added guarded exception catches

This commit is contained in:
Jonathan Turner
2009-09-19 13:30:11 +00:00
parent 6a47846b84
commit 813fa055a3
5 changed files with 98 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ namespace chaiscript
class Token_Type { public: enum Type { Error, Int, Float, Id, Char, Str, Eol, Fun_Call, Inplace_Fun_Call, Arg_List, Variable, Equation, Var_Decl,
Expression, Comparison, Additive, Multiplicative, Negate, Not, Array_Call, Dot_Access, Quoted_String, Single_Quoted_String,
Lambda, Block, Def, While, If, For, Inline_Array, Inline_Map, Return, File, Prefix, Break, Map_Pair, Value_Range,
Inline_Range, Annotation, Try }; };
Inline_Range, Annotation, Try, Catch }; };
/**
* Helper lookup to get the name of each node type
@@ -50,7 +50,7 @@ namespace chaiscript
const char *token_types[] = { "Internal Parser Error", "Int", "Float", "Id", "Char", "Str", "Eol", "Fun_Call", "Inplace_Fun_Call", "Arg_List", "Variable", "Equation", "Var_Decl",
"Expression", "Comparison", "Additive", "Multiplicative", "Negate", "Not", "Array_Call", "Dot_Access", "Quoted_String", "Single_Quoted_String",
"Lambda", "Block", "Def", "While", "If", "For", "Inline_Array", "Inline_Map", "Return", "File", "Prefix", "Break", "Map_Pair", "Value_Range",
"Inline_Range", "Annotation", "Try"};
"Inline_Range", "Annotation", "Try", "Catch"};
return token_types[tokentype];
}