Skip to content

Commit edf2653

Browse files
authored
feat(gui): import file to GUI and name scopes (#30)
* import to GUI and name scopes * remove unecessary dependency
1 parent 59cf485 commit edf2653

File tree

12 files changed

+722
-121
lines changed

12 files changed

+722
-121
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### Argon ###
2+
*.gui
3+
14
### Linux ###
25
*~
36

Cargo.lock

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/compiler/examples/nested_inst.ar

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ cell top() {
3030
eq(right.x, 300.);
3131
eq(right.y, 0.);
3232
}
33-
#scope1
3433
if 1 > 2 { } else { }
3534
let met3 = rect("met3", x0=left.bot.met1.x0, y0=20., x1=right.bot.met1.x1, y1=80.)!;
3635
let duplicate_rect = left.bot.met3!;
3736
}
38-

core/compiler/src/argon.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ Expr -> Result<Expr<'input, ParseMetadata>, ()>
237237
;
238238

239239
BlockExpr -> Result<Expr<'input, ParseMetadata>, ()>
240-
: 'IF' Expr Scope 'ELSE' Scope { Ok(Expr::If(Box::new(IfExpr { scope_annotation: None, cond: $2?, then: Expr::Scope(Box::new($3?)), else_: Expr::Scope(Box::new($5?)), span: $span, metadata: (), }))) }
241-
| ScopeAnnotation 'IF' Expr Scope 'ELSE' Scope { Ok(Expr::If(Box::new(IfExpr { scope_annotation: Some($1?), cond: $3?, then: Expr::Scope(Box::new($4?)), else_: Expr::Scope(Box::new($6?)), span: $span, metadata: (), }))) }
240+
: 'IF' Expr Scope 'ELSE' Scope { Ok(Expr::If(Box::new(IfExpr { scope_annotation: None, cond: $2?, then: $3?, else_: $5?, span: $span, metadata: (), }))) }
241+
| ScopeAnnotation 'IF' Expr Scope 'ELSE' Scope { Ok(Expr::If(Box::new(IfExpr { scope_annotation: Some($1?), cond: $3?, then: $4?, else_: $6?, span: $span, metadata: (), }))) }
242242
| Scope { Ok(Expr::Scope(Box::new($1?))) }
243243
;
244244

0 commit comments

Comments
 (0)