package jetbrains.mps.lang.smodel.generator.baseLanguage.template.main; /*Generated by MPS */ import jetbrains.mps.generator.runtime.Generated; import jetbrains.mps.generator.runtime.TemplateSwitchBase; import jetbrains.mps.generator.runtime.TemplateSwitchMapping; import jetbrains.mps.generator.runtime.TemplateReductionRule; import jetbrains.mps.generator.runtime.TemplateUtil; import org.jetbrains.mps.openapi.model.SNodeReference; import jetbrains.mps.smodel.SNodePointer; import java.util.Collection; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.generator.runtime.TemplateExecutionEnvironment; import jetbrains.mps.generator.runtime.TemplateContext; import jetbrains.mps.generator.runtime.GenerationException; import jetbrains.mps.generator.impl.DismissTopMappingRuleException; import jetbrains.mps.generator.runtime.ReductionRuleBase; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.annotations.NotNull; import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext; @Generated public class Switch_switch_ILinkAccessQualifier_toSLink extends TemplateSwitchBase implements TemplateSwitchMapping { private final Iterable<TemplateReductionRule> rules; public Switch_switch_ILinkAccessQualifier_toSLink() { rules = TemplateUtil.<TemplateReductionRule>asIterable(new Switch_switch_ILinkAccessQualifier_toSLink.ReductionRule0(), new Switch_switch_ILinkAccessQualifier_toSLink.ReductionRule1()); } public SNodeReference getSwitchNode() { return new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653082203"); } public SNodeReference getModifiesSwitch() { return null; } public Iterable<TemplateReductionRule> getReductionRules() { return rules; } public Collection<SNode> applyDefault(final TemplateExecutionEnvironment environment, SNodeReference templateSwitch, String mappingLabel, final TemplateContext context) throws GenerationException { DismissTopMappingRuleException ex_lm3fls_a = new DismissTopMappingRuleException(DismissTopMappingRuleException.MessageType.error, "Unsupported ILinkAccessQualifier found. Reference to LinkDeclaration cannot be generated."); ex_lm3fls_a.setTemplateContext(context); ex_lm3fls_a.setTemplateModelLocation(new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653082238")); throw ex_lm3fls_a; } public void processNull(TemplateExecutionEnvironment environment, SNodeReference templateSwitch, TemplateContext context) { } public final class ReductionRule0 extends ReductionRuleBase { public ReductionRule0() { super(new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653082204"), MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x11885c0d945L, "jetbrains.mps.lang.smodel.structure.PoundExpression"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = null; final SNode copySrcInput1 = QueriesGenerated.sourceNodeQuery_3902354333653082208(new SourceSubstituteMacroNodeContext(context, copySrcMacro_xmgu17_b0a0d0b7)); tlist1 = environment.copyNodes(TemplateUtil.singletonList(copySrcInput1), copySrcMacro_xmgu17_b0a0d0b7, "tpl/r:00000000-0000-4000-0000-011c89590303/3902354333653082206", context); return tlist1; } } public final class ReductionRule1 extends ReductionRuleBase { public ReductionRule1() { super(new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653082214"), MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x11886c4bac0L, "jetbrains.mps.lang.smodel.structure.LinkRefQualifier"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = null; try { SNode callInputNode1 = QueriesGenerated.sourceNodeQuery_3902354333653114307(new SourceSubstituteMacroNodeContext(context, includeMacro_xmgu17_b0a0a0a2a1i)); TemplateContext context1 = context.subContext(null, callInputNode1); if (callInputNode1 != null) { try { tlist1 = new Template_reduce_LinkDeclaration_SLink().apply(environment, context1); } finally { } } } finally { } return tlist1; } } private static SNodePointer copySrcMacro_xmgu17_b0a0d0b7 = new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653082207"); private static SNodePointer includeMacro_xmgu17_b0a0a0a2a1i = new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "3902354333653094589"); }