Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg @ 7848:698cd036a1ca
Added a ternary operator to simple language to test short circuit specialization.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 19 Feb 2013 17:27:02 +0100 |
parents | 442668d41bc2 |
children | b6a87711eca0 |
comparison
equal
deleted
inserted
replaced
7847:06a7cd6aaf00 | 7848:698cd036a1ca |
---|---|
129 | | 129 | |
130 StringLiteral<out result> | 130 StringLiteral<out result> |
131 | | 131 | |
132 NumericLiteral<out result> | 132 NumericLiteral<out result> |
133 | | 133 | |
134 Ternary<out result> | |
135 | | |
134 "(" Expression<out result> ")" | 136 "(" Expression<out result> ")" |
135 ) | 137 ) |
136 . | 138 . |
137 | 139 |
138 TimeRef<out TypedNode result> | 140 Ternary<out TypedNode result> (. TypedNode condition, thenPart, elsePart; .) |
141 = | |
142 "#" Expression<out condition> "?" Expression<out thenPart> ":" Expression<out elsePart> | |
143 (. result = factory.createTernary(condition, thenPart, elsePart); .) | |
144 . | |
145 | |
146 TimeRef<out TypedNode result> | |
139 = | 147 = |
140 "time" (. result = factory.createTime(); .) | 148 "time" (. result = factory.createTime(); .) |
141 . | 149 . |
142 | 150 |
143 VariableRef<out TypedNode result> | 151 VariableRef<out TypedNode result> |