public ParseTreeList(int startPosition, int endPosition, CowList<ParseTree> members, Synpl.Core.Parser parser, ParseTree parent, TextWithChanges text) : base(startPosition, endPosition, members, parser, parent, text, "() (list)") { }
public ParseTreeQuote(int startPosition, int endPosition, ParseTree quotedTree, Synpl.Core.Parser parser, ParseTree parent, TextWithChanges text) : base(startPosition, endPosition, MakeList(quotedTree), parser, parent, text, "' (quote)") { }
public ParseTreeAtom(int startPosition, int endPosition, string content, Synpl.Core.Parser parser, ParseTree parent, TextWithChanges text) : base(startPosition, endPosition, new CowList<ParseTree>(), parser, parent, text, content) { _content = content; }
public bool HandleKey(Synpl.EditorAbstraction.Key key) { // Console.WriteLine("Shell key handling: {0}", key.ToString()); _chordBuffer.Enqueue(key); while (_chordBuffer.Count > 5) { _chordBuffer.Dequeue(); } DebugDisplayChordBuffer(); if (TypedChord("C-a")) { _editor.MoveToStartOfLine(); return true; } else if (TypedChord("Tab")) { Indent(); return true; } else if (TypedChord("C-e")) { _editor.MoveToEndOfLine(); return true; } else if (TypedChord("C-x C-t") && !InStructureMode()) { EnterStructureMode(); return true; } else if (TypedChord("C-g") && InStructureMode()) { ExitStructureMode(); return true; } else if (TypedChord("C-n")) { _editor.MoveForwardLines(1); return true; } else if (TypedChord("C-p")) { _editor.MoveForwardLines(-1); return true; } else if (TypedChord("C-b")) { _editor.MoveForwardChars(-1); return true; } else if (TypedChord("C-f")) { _editor.MoveForwardChars(1); return true; } if (InStructureMode()) { if (TypedChord("q")) { ExitStructureMode(); return true; } else if (TypedChord("i")) { Indent(); return true; } else if (TypedChord("p")) { ExtendToParent(); return true; } else if (TypedChord("l")) { LastSelection(); return true; } else if (TypedChord("m")) { _structureModeAction = "m"; return true; } else if (TypedChord("r")) { _structureModeAction = "r"; return true; } else if (TypedChord("x")) { _structureModeAction = "x"; return true; } else if (TypedChord("t")) { _structureModeAction = "t"; return true; } else if (TypedChord("u")) { switch (_structureModeAction) { case "m": SelectPreviousSibling(); return true; case "t": MoveUp(); UpdateFormatting(); ConsistencyCheck(); return true; } } else if (TypedChord("d")) { switch (_structureModeAction) { case "m": SelectNextSibling(); return true; case "t": MoveDown(); UpdateFormatting(); ConsistencyCheck(); return true; } } else if (TypedChord("c")) { SelectFirstChild(); return true; } else if (TypedChord("y")) { _parseTree = PrettyPrint(); return true; } } return false; }