From: Michael D. Lowis Date: Mon, 27 Jan 2020 21:58:15 +0000 (-0500) Subject: added more scaffolding for declarations and assignments X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=cdd23bbcdeae18c4fe118f0879a1230c075b2999;p=proto%2Fsclpl-rb.git added more scaffolding for declarations and assignments --- diff --git a/compile.rb b/compile.rb index f702ee1..5fb23e5 100755 --- a/compile.rb +++ b/compile.rb @@ -303,9 +303,14 @@ class Parser Ast::Return.new(expr[:type], expr) elsif matches(:if) elseif matches(:ident) - # declaration - # assignment - # procedure call + name = expect(:ident) + if matches(":") +# declaration(name) + elsif matches("=") +# assignment + else +# binary_expr(name) # procedure call / expression + end else error("invalid statment") end