コード例 #1
0
 protected String _toXtext(final RuleCall rc) {
   AbstractRule _rule = rc.getRule();
   String _name = _rule.getName();
   String _elvis = null;
   String _cardinality = rc.getCardinality();
   if (_cardinality != null) {
     _elvis = _cardinality;
   } else {
     _elvis = "";
   }
   return (_name + _elvis);
 }
コード例 #2
0
 protected boolean _mustBeParenthesized(final RuleCall it) {
   boolean _or = false;
   boolean _or_1 = false;
   boolean _predicated = this.predicated(it);
   if (_predicated) {
     _or_1 = true;
   } else {
     boolean _isFirstSetPredicated = it.isFirstSetPredicated();
     _or_1 = _isFirstSetPredicated;
   }
   if (_or_1) {
     _or = true;
   } else {
     String _cardinality = it.getCardinality();
     boolean _notEquals = (!Objects.equal(_cardinality, null));
     _or = _notEquals;
   }
   return _or;
 }