문제

I need to declare an integer array in a domain specific language using xtext.

PolyLine:
'polyline' color = Color '{'                    Line1
'points number' n = INT                         Line2
'x points'                                      Line3
'y ponts'                                       Line4
'}';

In above rule declaration, I need to get several x and y points which indicate some coordination (theirs number is equal to n property in line2). But I can't find any document that help me to answer my question "How I can declare a array in xtext"? Can somebody help please?

도움이 되었습니까?

해결책

I am not quite sure what your questions targets but you can have lists of things basically using the += operator

points+=INT+

(points+=INT ("," points+=INT)*)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top