comparison modules/ast.tp @ 310:2308336790d4

WIP compiler module for low-level dialect
author Michael Pavone <pavone@retrodev.com>
date Fri, 01 Aug 2014 18:56:39 -0700
parents 98147071baf6
children 27477c8c2823
comparison
equal deleted inserted replaced
309:ed908b7fcec6 310:2308336790d4
64 #{ 64 #{
65 nodeType <- { _int } 65 nodeType <- { _int }
66 val <- _val 66 val <- _val
67 base <- _base 67 base <- _base
68 bits <- _bits 68 bits <- _bits
69 size <- { _bits / 8 }
69 signed? <- _signed? 70 signed? <- _signed?
70 stringIndent <- :indent { 71 stringIndent <- :indent {
71 suffix <- "" 72 suffix <- ""
72 if: bits != 32 || (not: signed?) { 73 if: bits != 32 || (not: signed?) {
73 suffix <- (if: signed? {"i"} else: {"u"}) . bits 74 suffix <- (if: signed? {"i"} else: {"u"}) . bits