Changeset 22936 for v6

Show
Ignore:
Timestamp:
11/09/08 16:35:08 (2 months ago)
Author:
pmurias
Message:

[m0ld] added noop
[mildew] noop is used for the then label in an if

Location:
v6
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • v6/mildew/src/AST.pm

    r22932 r22936  
    5555    'my '.$id_cond.'_val = '.$id_cond.'."FETCH"();'.$/. 
    5656    'my '.$id_cond.'_bool = '.$id_cond.'_val."bool"();'.$/. 
    57     'if '.$id_cond.'_bool { goto '.$label_then.'; } else { goto '.$label_else.'; };'.$/. 
     57    'if '.$id_cond.'_bool { goto '.$label_then.' } else { goto '.$label_else.' };'.$/. 
    5858    $label_then.':'.$/. 
    5959    $then.$/. 
    60     $label_else.':'.$/; 
     60    $label_else.': noop;'.$/; 
    6161} 
    6262 
  • v6/smop/m0ld/M0ld/Parser.hs

    r22640 r22936  
    3636    return [LabelDef id] 
    3737 
     38 
    3839stmt = do  
    3940    l <- option [] (try label) 
    40     body <- choice $ map try [label,call2,call,decl,goto,br] 
     41    body <- choice $ map try [call2,call,decl,goto,br,noop] 
    4142    return $ l ++ body 
    4243 
     
    8586    defaultValue <- option None $ symbol "=" >> constant 
    8687    return [Decl x defaultValue] 
     88 
     89noop = string "noop" >> return [] 
    8790 
    8891branch = inBraces $ do