@tripley-kit/xfs-form-parser 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -17876,11 +17876,10 @@ var XFSFormParserVisitor = class extends antlr4.ParseTreeVisitor {
17876
17876
  const forms = [];
17877
17877
  const medias = [];
17878
17878
  for (const child of ctx.children || []) {
17879
- const typeName = child.constructor.name;
17880
- if (typeName.startsWith("FormDefinitionContext")) {
17879
+ if (child.ruleIndex === XFSFormParser.RULE_formDefinition) {
17881
17880
  const form = this.visitFormDefinition(child);
17882
17881
  if (form) forms.push(form);
17883
- } else if (typeName.startsWith("MediaDefinitionContext")) {
17882
+ } else if (child.ruleIndex === XFSFormParser.RULE_mediaDefinition) {
17884
17883
  const media = this.visitMediaDefinition(child);
17885
17884
  if (media) medias.push(media);
17886
17885
  }
@@ -17895,13 +17894,12 @@ var XFSFormParserVisitor = class extends antlr4.ParseTreeVisitor {
17895
17894
  const bodyCtx = ctx.formBody();
17896
17895
  if (bodyCtx && bodyCtx.children) {
17897
17896
  for (const child of bodyCtx.children) {
17898
- const typeName = child.constructor.name;
17899
- if (typeName.startsWith("FormPropertyContext")) {
17897
+ if (child.ruleIndex === XFSFormParser.RULE_formProperty) {
17900
17898
  this.parseFormProperty(child, properties);
17901
- } else if (typeName.startsWith("FrameDefinitionContext")) {
17899
+ } else if (child.ruleIndex === XFSFormParser.RULE_frameDefinition) {
17902
17900
  const frame = this.visitFrameDefinition(child);
17903
17901
  if (frame) frames.push(frame);
17904
- } else if (typeName.startsWith("FieldDefinitionContext")) {
17902
+ } else if (child.ruleIndex === XFSFormParser.RULE_fieldDefinition) {
17905
17903
  const field = this.visitFieldDefinition(child);
17906
17904
  if (field) fields.push(field);
17907
17905
  }
@@ -17915,7 +17913,7 @@ var XFSFormParserVisitor = class extends antlr4.ParseTreeVisitor {
17915
17913
  const bodyCtx = ctx.frameBody();
17916
17914
  if (bodyCtx && bodyCtx.children) {
17917
17915
  for (const child of bodyCtx.children) {
17918
- if (child.constructor.name.startsWith("FramePropertyContext")) {
17916
+ if (child.ruleIndex === XFSFormParser.RULE_frameProperty) {
17919
17917
  this.parseFrameProperty(child, properties);
17920
17918
  }
17921
17919
  }
@@ -17928,7 +17926,7 @@ var XFSFormParserVisitor = class extends antlr4.ParseTreeVisitor {
17928
17926
  const bodyCtx = ctx.fieldBody();
17929
17927
  if (bodyCtx && bodyCtx.children) {
17930
17928
  for (const child of bodyCtx.children) {
17931
- if (child.constructor.name.startsWith("FieldPropertyContext")) {
17929
+ if (child.ruleIndex === XFSFormParser.RULE_fieldProperty) {
17932
17930
  this.parseFieldProperty(child, properties);
17933
17931
  }
17934
17932
  }
@@ -17941,7 +17939,7 @@ var XFSFormParserVisitor = class extends antlr4.ParseTreeVisitor {
17941
17939
  const bodyCtx = ctx.mediaBody();
17942
17940
  if (bodyCtx && bodyCtx.children) {
17943
17941
  for (const child of bodyCtx.children) {
17944
- if (child.constructor.name.startsWith("MediaPropertyContext")) {
17942
+ if (child.ruleIndex === XFSFormParser.RULE_mediaProperty) {
17945
17943
  this.parseMediaProperty(child, properties);
17946
17944
  }
17947
17945
  }