@@ -136,7 +136,8 @@ Class {
136136 ' tExpression' ,
137137 ' expression' ,
138138 ' tBinaryExpression' ,
139- ' operator'
139+ ' operator' ,
140+ ' tUnaryOperator'
140141 ],
141142 #category : ' FAST-Python-Model-Generator' ,
142143 #package : ' FAST-Python-Model-Generator'
@@ -280,7 +281,7 @@ FASTPythonMetamodelGenerator >> defineClasses [
280281 typeParameter := builder ensureClassNamed: #TypeParameter ." Todo"
281282 typedDefaultParameter := builder ensureClassNamed: #TypedDefaultParameter ." Todo"
282283 typedParameter := builder ensureClassNamed: #TypedParameter ." Todo"
283- unaryOperator := builder ensureClassNamed: #UnaryOperator ." Todo "
284+ unaryOperator := builder ensureClassNamed: #UnaryOperator .
284285 unionPattern := builder ensureClassNamed: #UnionPattern ." Todo"
285286 unionType := builder ensureClassNamed: #UnionType ." Todo"
286287 whileStatement := builder ensureClassNamed: #WhileStatement ." Todo"
@@ -338,11 +339,15 @@ FASTPythonMetamodelGenerator >> defineHierarchy [
338339 module -- | > #THasImmediateSource .
339340
340341 notOperator -- | > operator.
342+ notOperator -- | > tUnaryOperator.
341343
342344 operator -- | > expression.
343345
344346 string -- | > literal.
345- string -- | > tStringLiteral
347+ string -- | > tStringLiteral.
348+
349+ unaryOperator -- | > operator.
350+ unaryOperator -- | > tUnaryOperator
346351]
347352
348353{ #category : ' definition' }
@@ -352,7 +357,9 @@ FASTPythonMetamodelGenerator >> defineProperties [
352357
353358 (comparisonOperator property: #operators type: #String )
354359 multivalued: true ;
355- comment: ' The comparators applied in order. Possible operators: <, <=, ==, !=, >=, >, <>, in, not in, is, is not'
360+ comment: ' The comparators applied in order. Possible operators: <, <=, ==, !=, >=, >, <>, in, not in, is, is not' .
361+
362+ unaryOperator property: #operator type: #String
356363]
357364
358365{ #category : ' definition' }
@@ -366,9 +373,9 @@ FASTPythonMetamodelGenerator >> defineRelations [
366373 ' List of the operands of the comparison operands. For example if we have `a == b != c`, it will be a, b and c.' )
367374 <> -* ((tExpression property: #parentComparisonOperator ) comment: ' Parent comparison expression of which I am.' ).
368375
369- ((notOperator property: #argument ) comment:
370- ' Expression to negate .' )
371- <> - ((tExpression property: #parentNotOperator ) comment: ' Parent not operator in which I am.' ).
376+ ((tUnaryOperator property: #argument ) comment:
377+ ' Expression influanced by the unary operator. .' )
378+ <> - ((tExpression property: #parentUnaryOperator ) comment: ' Parent unary operator in which I am.' ).
372379
373380]
374381
@@ -379,6 +386,9 @@ FASTPythonMetamodelGenerator >> defineTraits [
379386
380387 " From FAST"
381388 tEntity := self remoteTrait: #TEntity withPrefix: #FAST .
389+
390+
391+ tUnaryOperator := builder newTraitNamed: #TUnaryOperator .
382392
383393 tBinaryExpression := self remoteTrait: #TBinaryExpression withPrefix: #FAST .
384394 tBooleanLiteral := self remoteTrait: #TBooleanLiteral withPrefix: #FAST .
0 commit comments