Пример #1
0
 public static void nodeFactory_NodeSetup_CoerceExpression_1178879020941(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(), "jetbrains.mps.lang.typesystem.structure.CoerceExpression")) {
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "nodeToCoerce",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.CoerceExpression"),
             "nodeToCoerce",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "pattern",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.CoerceExpression"),
             "pattern",
             true),
         true);
   }
 }
Пример #2
0
 public static void nodeFactory_NodeSetup_IsSubtypeExpression_1177408248540(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(), "jetbrains.mps.lang.typesystem.structure.IsSubtypeExpression")) {
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "subtypeExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.IsSubtypeExpression"),
             "subtypeExpression",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "supertypeExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.IsSubtypeExpression"),
             "supertypeExpression",
             true),
         true);
   }
 }
Пример #3
0
 public static void nodeFactory_NodeSetup_CBinaryOp_6585869519574724396(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(), "jetbrains.mps.nanoc.structure.CBinaryOp")) {
     SNode binaryOp =
         SNodeOperations.cast(_context.getSampleNode(), "jetbrains.mps.nanoc.structure.CBinaryOp");
     SLinkOperations.setTarget(
         _context.getNewNode(), "left", SLinkOperations.getTarget(binaryOp, "left", true), true);
     SLinkOperations.setTarget(
         _context.getNewNode(), "right", SLinkOperations.getTarget(binaryOp, "right", true), true);
   }
 }
Пример #4
0
 public static void nodeFactory_NodeSetup_TypeOfExpression_1179476271704(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(), "jetbrains.mps.baseLanguage.structure.Expression")) {
     if (!(SNodeOperations.isInstanceOf(
         _context.getSampleNode(), "jetbrains.mps.lang.typesystem.structure.TypeOfExpression"))) {
       SLinkOperations.setTarget(
           _context.getNewNode(),
           "term",
           SNodeOperations.cast(
               _context.getSampleNode(), "jetbrains.mps.baseLanguage.structure.Expression"),
           true);
     } else {
       SLinkOperations.setTarget(
           _context.getNewNode(),
           "term",
           SLinkOperations.getTarget(
               SNodeOperations.cast(
                   _context.getSampleNode(),
                   "jetbrains.mps.lang.typesystem.structure.TypeOfExpression"),
               "term",
               true),
           true);
     }
   }
 }
Пример #5
0
 public static void nodeFactory_NodeSetup_AbstractEquationStatement_1174664649251(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(),
       "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement")) {
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "leftExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "leftExpression",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "rightExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "rightExpression",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "nodeToCheck",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "nodeToCheck",
             true),
         true);
   }
 }
Пример #6
0
 public static void nodeFactory_NodeSetup_AbstractEquationStatement_1174664649251(
     final IOperationContext operationContext, final NodeSetupContext _context) {
   if (SNodeOperations.isInstanceOf(
       _context.getSampleNode(),
       "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement")) {
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "leftExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "leftExpression",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "rightExpression",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "rightExpression",
             true),
         true);
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "nodeToCheck",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "nodeToCheck",
             true),
         true);
     SPropertyOperations.set(
         _context.getNewNode(),
         "checkOnly",
         ""
             + (SPropertyOperations.getBoolean(
                 SNodeOperations.cast(
                     _context.getSampleNode(),
                     "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
                 "checkOnly")));
     SLinkOperations.setTarget(
         _context.getNewNode(),
         "errorString",
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 _context.getSampleNode(),
                 "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
             "errorString",
             true),
         true);
     ListSequence.fromList(
             SLinkOperations.getTargets(_context.getNewNode(), "helginsIntention", true))
         .addSequence(
             ListSequence.fromList(
                 SLinkOperations.getTargets(
                     SNodeOperations.cast(
                         _context.getSampleNode(),
                         "jetbrains.mps.lang.typesystem.structure.AbstractEquationStatement"),
                     "helginsIntention",
                     true)));
   }
 }