Changes between Version 66 and Version 67 of IR2
- Timestamp:
- 05/03/21 22:29:54 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v66 v67 11 11 * In general, symbols can be used before they are defined, as long as they are in scope. For example, a function f can call g, even if g is defined after f in the same scope. There is no need for a "prototype". Similarly, a type definition can refer to a type defined later, or can refer to itself in its own definition. 12 12 * Many of the core operations are implemented as functions in the standard library. This is similar to C. The header files for the standard library are an integral part of the language. 13 * Evaluation of expressions and execution of statements should always result in a value or state. There is no concept of exception or error. Hence anything that should be checked should be checked by explicit assertions. 13 14 14 15 … … 194 195 195 196 {{{ 196 lvalue:197 expr: 197 198 | ID 198 | lvalue '[' expr ']'199 | lvalue '.' ID200 | '*' expr201 ;202 expr:203 199 | lvalue 204 200 | '$true' … … 226 222 | expr '<' expr /* less than */ 227 223 | expr '<=" expr /* less than or equal to */ 228 | expr '[' expr ']' /* array access */ 224 | expr '[' expr ']' /* array element access */ 225 | expr '.' ID /* field access */ 229 226 | '(' expr ')' 230 227 | '-' expr /* negative */
