package Ġorg . lex em . ang mar . analyzer . nodes . de scriptive . expressions . macros Ċ Ċ import Ġorg . junit . jupiter . api .* Ċ import Ġorg . lex em . ang mar . analyzer .* Ċ import Ġorg . lex em . ang mar . analyzer . data . primitives .* Ċ import Ġorg . lex em . ang mar . analyzer . data . referenced .* Ċ import Ġorg . lex em . ang mar . parser . de scriptive . expressions . macros .* Ċ import Ġorg . lex em . ang mar . parser . functional . expressions .* Ċ import Ġorg . lex em . ang mar . parser . literals .* Ċ import Ġorg . lex em . ang mar . utils .* Ċ Ċ internal Ġclass ĠMacro Check Props Analyzer Test Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġall Ġcorrect `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaff ir mat ive Var Ġ= Ġ" a " ĊĠĠĠĠĠĠĠ Ġval Ġnegative Var Ġ= Ġ" b " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Var Ġ= Ġ" c " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Value Ġ= Ġ 6 ĊĠĠĠĠĠĠĠ Ġval Ġaff ir mat ive Ġ= Ġaff ir mat ive Var ĊĠĠĠĠĠĠĠ Ġval Ġnegative Ġ= Ġ"${ Property Style Object Block Node . negative Token }$ negative Var " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"${ Property Style Object Block Node . set Token }$ with Value Var ${ Parent hesis Expression Node . start Token }$ with Value Value ${ Parent hesis Expression Node . end Token }" ĊĠĠĠĠĠĠĠ Ġval Ġgrammar Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"${ Macro Check Props Node . macro Name }${ Property Style Object Block Node . start Token }$ aff ir mat ive Ġ$ negative Ġ$ with Value ${ Property Style Object Block Node . end Token }" ĊĠĠĠĠĠĠĠ Ġval Ġanalyzer Ġ= ĠTestUtils . create Analyzer From ( grammar , Ġparser Function Ġ= ĠMacro Check Props Node . Companion :: parse , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Descript ive Code Ġ= Ġtrue ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠPrepare Ġcontext Ġfor Ġtext Ġle xe mes . ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠAnalyzer Common s . getCurrent Context ( analyzer . memory ) ĊĠĠĠĠĠĠĠ Ġval Ġnode Ġ= ĠL xm Node (" name ", Ġanalyzer . text . save Cursor (), Ġnull , Ġanalyzer . memory ) ĊĠĠĠĠĠĠĠ Ġval Ġprops Ġ= Ġnode . getProperties ( analyzer . memory ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġaff ir mat ive Var , ĠL xm Logic . True ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġnegative Var , ĠL xm Logic . False ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġwith Value Var , ĠL xm Integer . from ( with Value Value )) ĊĠĠĠĠĠĠĠ Ġcontext . setProperty As Context ( analyzer . memory , ĠAnalyzer Common s . Identifiers . Node , Ġanalyzer . memory . add ( node )) ĊĊĠĠĠĠĠĠĠ ĠTestUtils . process And Check Empty ( analyzer ) ĊĊĠĠĠĠĠĠĠ ĠAssertions . assertEquals ( L xm Logic . True , Ġanalyzer . memory . getLast From Stack (), Ġ" The Ġresult Ġis Ġincorrect ") ĊĊĠĠĠĠĠĠĠ Ġ// ĠRemove ĠLast Ġfrom Ġthe Ġstack . ĊĠĠĠĠĠĠĠ Ġanalyzer . memory . remove Last From Stack () ĊĊĠĠĠĠĠĠĠ ĠTestUtils . check Empty Stack And Context ( analyzer , ĠlistOf ( Analyzer Common s . Identifiers . Node )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġany Ġincorrect `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaff ir mat ive Var Ġ= Ġ" a " ĊĠĠĠĠĠĠĠ Ġval Ġnegative Var Ġ= Ġ" b " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Var Ġ= Ġ" c " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Value Ġ= Ġ 6 ĊĠĠĠĠĠĠĠ Ġval Ġaff ir mat ive Ġ= Ġaff ir mat ive Var ĊĠĠĠĠĠĠĠ Ġval Ġnegative Ġ= Ġ"${ Property Style Object Block Node . negative Token }$ negative Var " ĊĠĠĠĠĠĠĠ Ġval Ġwith Value Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"${ Property Style Object Block Node . set Token }$ with Value Var ${ Parent hesis Expression Node . start Token }$ with Value Value ${ Parent hesis Expression Node . end Token }" ĊĠĠĠĠĠĠĠ Ġval Ġgrammar Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"${ Macro Check Props Node . macro Name }${ Property Style Object Block Node . start Token }$ aff ir mat ive Ġ$ negative Ġ$ with Value ${ Property Style Object Block Node . end Token }" ĊĠĠĠĠĠĠĠ Ġval Ġanalyzer Ġ= ĠTestUtils . create Analyzer From ( grammar , Ġparser Function Ġ= ĠMacro Check Props Node . Companion :: parse , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Descript ive Code Ġ= Ġtrue ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠPrepare Ġcontext Ġfor Ġtext Ġle xe mes . ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠAnalyzer Common s . getCurrent Context ( analyzer . memory ) ĊĠĠĠĠĠĠĠ Ġval Ġnode Ġ= ĠL xm Node (" name ", Ġanalyzer . text . save Cursor (), Ġnull , Ġanalyzer . memory ) ĊĠĠĠĠĠĠĠ Ġval Ġprops Ġ= Ġnode . getProperties ( analyzer . memory ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġaff ir mat ive Var , ĠL xm Nil ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġnegative Var , ĠL xm Logic . False ) ĊĠĠĠĠĠĠĠ Ġprops . setProperty ( analyzer . memory , Ġwith Value Var , ĠL xm Integer . from ( with Value Value )) ĊĠĠĠĠĠĠĠ Ġcontext . setProperty As Context ( analyzer . memory , ĠAnalyzer Common s . Identifiers . Node , Ġanalyzer . memory . add ( node )) ĊĊĠĠĠĠĠĠĠ ĠTestUtils . process And Check Empty ( analyzer ) ĊĊĠĠĠĠĠĠĠ ĠAssertions . assertEquals ( L xm Logic . False , Ġanalyzer . memory . getLast From Stack (), Ġ" The Ġresult Ġis Ġincorrect ") ĊĊĠĠĠĠĠĠĠ Ġ// ĠRemove ĠLast Ġfrom Ġthe Ġstack . ĊĠĠĠĠĠĠĠ Ġanalyzer . memory . remove Last From Stack () ĊĊĠĠĠĠĠĠĠ ĠTestUtils . check Empty Stack And Context ( analyzer , ĠlistOf ( Analyzer Common s . Identifiers . Node )) ĊĠĠĠ Ġ} Ċ } Ċ