public override void ExitProtocol([NotNull] LuminaryParser.ProtocolContext context) { if (File != _types.Pop() as FileNode || _types.Count != 0) { throw new InvalidOperationException(@"Something went completely wrong."); } }
public override void EnterProtocol([NotNull] LuminaryParser.ProtocolContext context) { File = new FileNode(); _types.Push(File); }