foo = force foo
#------------------------------------------------------------------------------
-# Prototype Classes
+# Classes
#------------------------------------------------------------------------------
# Define a macro for creating new classes
# Animal is a constructor so call it to create a new cow
Cow := Animal()
-# And call the method to print the sound
+# And call the method to print the sound (This syntax needs to be cleaned up a bit)
(Cow.mating_call)()
AST* DLParser::MacroExpansion()
{
AST* ret = NULL;
- Macro macro = macros[ lookaheadToken(1).text() ];
+ string macro_name = lookaheadToken(1).text();
+ Macro macro = macros[ macro_name ];
std::list<Pattern>::iterator patt_it;
match(ID);
if (ret == NULL)
{
- throw "Did not find a matching pattern for keyword <macro-name>";
+ Exception ex;
+ ex << "Did not find a matching pattern for keyword " << macro_name << ".";
+ throw ex;
}
return ret;
switch( cur->type() )
{
case MEMB:
- cur->children()->back()->type( STRING );
+ cur->children()->back()->type( SYMBOL );
break;
case BLOCK: