Example #1
0
        private void ParseNode(Scanner scanner, TablatureNode tablature)
        {
            scanner.SkipWhitespaces(false);
            if (scanner.EndOfInput)
            {
                return;
            }

            if (scanner.Peek() == '+')
            {
                CommandletParserBase commandletParser;;
                if (!CommandletParser.TryCreate(scanner, this, out commandletParser))
                {
                    return;
                }

                CommandletNode commandlet;
                if (!commandletParser.TryParse(scanner, out commandlet))
                {
                    return;
                }

                tablature.Nodes.Add(commandlet);
                return;
            }

            BarNode bar;

            if (new BarParser(false).TryParse(scanner, out bar))
            {
                tablature.Nodes.Add(bar);
            }
        }
Example #2
0
 public static bool IsEndOfVoice(Scanner scanner)
 {
     return(scanner.Peek() == ';' || RhythmSegmentParser.IsEndOfSegment(scanner));
 }