Exemplo n.º 1
0
        public TokenChain Compile(string code)
        {
            var tokens = parser.Parse(code);

            var assembly = new TokenChain(tokens);

            return(assembly);
        }
Exemplo n.º 2
0
        protected override T RunParser <T>(string source, Document doc, ICodeParser <T> parser)
        {
            source = (source ?? String.Empty).TrimEnd('\0');
            var sci    = App.Editor().Control as ScintillaControl;
            var logger = new BuildLogger(App, doc, sci, new BuildOptions());
            var res    = parser.Parse(source, doc, logger);

            return(res);
        }
Exemplo n.º 3
0
        public virtual CodeCompileUnit Parse(TextReader codeStream)
        {
            ICodeParser cp = CreateParser();

            if (cp == null)
            {
                throw GetNotImplemented();
            }
            return(cp.Parse(codeStream));
        }
Exemplo n.º 4
0
 public Pattern(ICodeParser parser, bool[] wildcards, byte[] bytes, string source, string name = null)
 {
     Parser    = parser;
     Wildcards = wildcards;
     Bytes     = bytes;
     Source    = source;
     Name      = string.IsNullOrEmpty(name) ? HybridPattern : name;
     codeText  = Parser.Parse(source);
     codeText.ApplyMask(Mask);
 }
Exemplo n.º 5
0
        public static Pattern FromParser(string source, string name, ICodeParser parser)
        {
            var codeText = parser.Parse(source);

            return(new Pattern(parser, codeText.Mask, codeText.Bytes, source, name));
        }
Exemplo n.º 6
0
 public CodeStructure Parse(string classText)
 {
     return(_classParser.Parse(classText));
 }
Exemplo n.º 7
0
        public CaDETProject CreateProject(IEnumerable <string> multipleClassSourceCode)
        {
            ICodeParser codeParser = SimpleParserFactory.CreateParser(_language);

            return(codeParser.Parse(multipleClassSourceCode));
        }