Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace Tracery
{
Expand Down Expand Up @@ -92,7 +93,9 @@ private ActionNode ParseAction()
Advance();
}


string[] parts = builder.ToString().Split(new char[]{':'}, 2);

Assert.AreEqual(parts.Length, 2); // TODO allow function actions
string key = parts[0];
NodeAction action;
Expand Down
4 changes: 2 additions & 2 deletions Source/Unity/GrammarEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class GrammarEditor : Editor
{
private int selected = 0;
private string testValue = null;
private string testValue ="";

public override void OnInspectorGUI()
{
Expand Down Expand Up @@ -60,7 +60,7 @@ public override void OnInspectorGUI()

GUILayout.Space(5);

if (GUILayout.Button("Test Grammar") || testValue == null)
if (GUILayout.Button("Test Grammar")|| testValue==null)
{
Grammar grammar = ((TraceryGrammar)target).Grammar;
testValue = grammar.Flatten("#origin#");
Expand Down
2 changes: 1 addition & 1 deletion Source/Unity/TraceryGrammar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public Grammar Grammar
{
grammar.PushRules(s.key, s.rules.Split('\n'));
}
return grammar;
return grammar;
}
}

Expand Down