public override void ExitShortcut(OrdinaryFormParser.ShortcutContext context)
        {
            var key      = (Key)_tokens.GetNumber(context.Key);
            var modifier = (KeyModifier)_tokens.GetNumber(context.Modifier);

            var shortcut = new Shortcut(key, modifier);

            _values.Put(context, shortcut);
        }
        public override void ExitLocalizedString(OrdinaryFormParser.LocalizedStringContext context)
        {
            var entireString = new LocalizedString();

            var count = _tokens.GetNumber(context.Count);

            for (int i = 0; i < count; i++)
            {
                var item = context.localizedStringItem(i);

                var locale = (Locale)_tokens.GetString(item.Locale);
                var value  = _tokens.GetString(item.Value);

                entireString.Add(locale, value);
            }

            _values.Put(context, entireString);
        }
        public override void ExitRelativeFont(OrdinaryFormParser.RelativeFontContext context)
        {
            var kind = (FontType)_tokens.GetNumber(context.Kind);

            RelativeFont font;

            switch (kind)
            {
            case FontType.AutoFont:
                font = ParseAutoFont(context);
                break;

            case FontType.WindowsFont:
                font = ParseWindowsFont(context);
                break;

            case FontType.StyleItem:
                font = ParseStyleItem(context);
                break;

            default:
                return;
            }

            _values.Put(context.Parent, font);
        }