如何修复:无法在 xtext 上解析交叉引用
How to fix: cross references cannot be resolved on xtext
我使用交叉引用定义了以下 xtext 语法
// dsl.xtext file
Students:
'student' studentID=ID fName=STRING lName=STRING (city=STRING)? (state=STRING)?
;
Payments:
'payment' paymentID=ID studentID=[Students] amount=INT
;
//The syntax is:
student s1001 "first name" "last name"
student s1002 "first name" "last name"
payment p101 s1002 12
我收到以下错误消息:
's1002' cannot be resolved.
我该如何解决这个问题?
将 studentID
更改为 name
,必须通过 name
进行交叉引用。
'student' name=ID fName=STRING lName=STRING (city=STRING)? (state=STRING)?
我使用交叉引用定义了以下 xtext 语法
// dsl.xtext file
Students:
'student' studentID=ID fName=STRING lName=STRING (city=STRING)? (state=STRING)?
;
Payments:
'payment' paymentID=ID studentID=[Students] amount=INT
;
//The syntax is:
student s1001 "first name" "last name"
student s1002 "first name" "last name"
payment p101 s1002 12
我收到以下错误消息:
's1002' cannot be resolved.
我该如何解决这个问题?
将 studentID
更改为 name
,必须通过 name
进行交叉引用。
'student' name=ID fName=STRING lName=STRING (city=STRING)? (state=STRING)?