# This file is currently not used.
# It was saved from the deleted directory 't/compilers/past-pm'

grammar NoneGrammar is TGE::Grammar;

transform past (ROOT) :language('PIR') {
    .local pmc past
    past = new 'PAST::Block'
    .local pmc op, childpast
    op  = node['op']
    childpast = tree.'get'('past', op, 'op')
    past.'push'(childpast)
    .return (past)
}
transform past (op) :language('PIR') {
    .local pmc past
    past = new 'PAST::Op'
    past.'init'('name'=>'test', 'pirop'=>'say')
    .local pmc val, childpast
    val = node['val']
    childpast = tree.'get'('past', val, 'val')
    past.'push'(childpast)
    .return (past)
}
transform past (val) :language('PIR') {
    .local pmc past
    $S0 = node
    past = new 'PAST::Val'
    past.'init'('vtype'=>'.String', 'name'=>$S0, 'ctype'=>'s~')
    .return (past)
}
