diff --git a/mirc/includes/parser.h b/mirc/includes/parser.h index d14ef3d..cc6b8c3 100644 --- a/mirc/includes/parser.h +++ b/mirc/includes/parser.h @@ -179,10 +179,20 @@ struct mirc_script : public grammar { = ch_p('%') >> identifier ; assignment - = !(str_p("var") >> *space) - >> variable[v_def] - >> *space >> ch_p('=') >> *space - >> expression[v_assign] + = ( + !(str_p("var") >> *space) + >> variable[v_def] + >> *space >> ch_p('=') >> *space + >> expression[v_assign] + ) + | + ( + !ch_p('/') + >> str_p("set") >> *space + >> variable[v_def] + >> *space + >> expression[v_assign] + ) ; alias_action = !ch_p('/') >> !ch_p('/') diff --git a/mirc/test.mrc b/mirc/test.mrc index 159a3df..d431305 100644 --- a/mirc/test.mrc +++ b/mirc/test.mrc @@ -2,14 +2,13 @@ echo TEST Code line match [ 2 = $line ] ; Test comment echo TEST Code line match [ 4 = $line ] -set name Correl %first = Correl - +set %last Roush %middle = Joseph %name = %first $& - %middle Roush + %middle %last echo Hello %name $+ ! $& How $lower(ArE YoU) $+ ? showversion