diff --git a/RScriptContext.cs b/RScriptContext.cs index f7322b4..40275b2 100644 --- a/RScriptContext.cs +++ b/RScriptContext.cs @@ -57,6 +57,11 @@ namespace Convention.RScript public string content; public List info; public Mode mode; + + public override string ToString() + { + return $"{mode.ToString()}/: {content}"; + } } public interface IRSentenceMatcher @@ -131,6 +136,7 @@ namespace Convention.RScript { namespaceLayers.Push(i); this.NamespaceLabels[namespaceName] = i; + namespaceName = ""; } else { @@ -278,12 +284,13 @@ namespace Convention.RScript { int current = CurrentRuntimePointer; DoEnterNamespace(parser); + CurrentRuntimePointer = labelPointer; for (int e = NamespaceLayer[NamespaceLabels[sentence.content]]; ;) { RunNextStep(parser); if (CurrentRuntimePointer >= Sentences.Length) break ; - else if (CurrentRuntimePointer != e) + else if (CurrentRuntimePointer == e) break; else CurrentRuntimePointer++;