protected void marshalLHS ( final StringBuilder buf , final RuleModel model , final boolean isDSLEnhanced , final LHSGeneratorContextFactory generatorContextFactory ) { String indentation = "\t\t" ; String nestedIndentation = indentation ; boolean isNegated = model . isNegated ( ) ; if ( model . lhs != null ) { if ( isNegated ) { nestedIndentation += "\t" ; buf . append ( indentation ) ; buf . append ( "not (\n" ) ; } LHSPatternVisitor visitor = getLHSPatternVisitor ( isDSLEnhanced , buf , nestedIndentation , isNegated , generatorContextFactory ) ; for ( IPattern cond : model . lhs ) { visitor . visit ( cond ) ; } if ( model . isNegated ( ) ) { //Delete the spurious " and ", added by LHSPatternVisitor.visitFactPattern, when the rule is negated buf . delete ( buf . length ( ) - 5 , buf . length ( ) ) ; buf . append ( "\n" ) ; buf . append ( indentation ) ; buf . append ( ")\n" ) ; } } }
Marshal LHS patterns