Esempio n. 1
0
        private C64Studio.Parser.BasicFileParser CreateParser(C64Studio.Parser.BasicFileParser.BasicVersion Version)
        {
            var parser = new C64Studio.Parser.BasicFileParser(new C64Studio.Parser.BasicFileParser.ParserSettings());

            parser.SetBasicVersion(Version);

            return(parser);
        }
Esempio n. 2
0
        private GR.Memory.ByteBuffer TestCompile(string Source, C64Studio.Parser.BasicFileParser.BasicVersion Version)
        {
            var parser = CreateParser(Version);

            C64Studio.Parser.CompileConfig config = new C64Studio.Parser.CompileConfig();
            config.OutputFile = "test.prg";
            config.TargetType = C64Studio.Types.CompileTargetType.PRG;

            bool parseResult = parser.Parse(Source, null, config, null);

            if (!parseResult)
            {
                Debug.Log("Testassemble failed:");
                foreach (var msg in parser.Messages.Values)
                {
                    Debug.Log(msg.Message);
                }
            }
            Assert.IsTrue(parser.Assemble(config));

            return(parser.AssembledOutput.Assembly);
        }