PopChoiceStringAndTags method

String PopChoiceStringAndTags(
  1. List<String> tags
)

Implementation

String PopChoiceStringAndTags(List<String> tags) {
  var choiceOnlyStrVal = state.popEvaluationStack() as StringValue;

  while (state.evaluationStack.isNotEmpty &&
      asOrNull<Tag>(state.peekEvaluationStack()) != null) {
    //tags ??= List<string>();
    var tag = state.popEvaluationStack() as Tag;
    tags.insert(0, tag.text); // popped in reverse order
  }

  return choiceOnlyStrVal.value;
}