Updated variable assignment to support the /set command

git-svn-id: file:///srv/svn/ircclient/trunk@14 a9804ffe-773b-11dd-bd7c-89c3ef1d2733
This commit is contained in:
Correl Roush 2009-11-10 05:39:37 +00:00
parent a8443598b8
commit 62bd189a5c
2 changed files with 16 additions and 7 deletions

View file

@ -179,10 +179,20 @@ struct mirc_script : public grammar<mirc_script> {
= ch_p('%') >> identifier
;
assignment
= !(str_p("var") >> *space)
= (
!(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('/')

View file

@ -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