]> gerrit.simantics Code Review - simantics/platform.git/blob
af84130f8f6cb8d2310fcc27c40655c1f2c7d60a
[simantics/platform.git] /
1 package org.simantics.scl.compiler.elaboration.expressions.records;
2
3 import org.simantics.scl.compiler.elaboration.contexts.ReplaceContext;
4 import org.simantics.scl.compiler.elaboration.expressions.Expression;
5 import org.simantics.scl.compiler.internal.parsing.Symbol;
6
7 public class FieldAssignment extends Symbol {
8     public String name;
9     public Expression value; // null if shorthand
10     
11     public FieldAssignment(String name, Expression value) {
12         this.name = name;
13         this.value = value;
14     }
15
16     public FieldAssignment replace(ReplaceContext context) {
17         return new FieldAssignment(name, value == null ? null : value.replace(context));
18     }
19 }