示例#1
0
        public override void VisitCompileObjectFile(FileElement element)
        {
            // TODO: compile the object file here
            // the object file element will have the filepath
            // and the output path

            var fileType = InputFileType.AsmSource;

            switch (System.IO.Path.GetExtension(element.Path))
            {
            case ".s":
                fileType = InputFileType.AsmSource;
                break;

            case ".c":
                fileType = InputFileType.CSource;
                break;

            case ".cpp":
                fileType = InputFileType.CppSource;
                break;

            case ".cc":
                fileType = InputFileType.CppSource;
                break;
            }


            //throw new NotImplementedException();

            // on error should we throw an exception?

            // I think so, a custom exception called CompileFileException
        }
示例#2
0
        public override void VisitCompileObjectFile(FileElement element)
        {
            // TODO: compile the object file here
            // the object file element will have the filepath
            // and the output path

            var fileType = InputFileType.AsmSource;
            switch (System.IO.Path.GetExtension(element.Path))
            {
                case ".s":
                    fileType = InputFileType.AsmSource;
                    break;

                case ".c":
                    fileType = InputFileType.CSource;
                    break;

                case ".cpp":
                    fileType = InputFileType.CppSource;
                    break;

                case ".cc":
                    fileType = InputFileType.CppSource;
                    break;
            }

            //throw new NotImplementedException();

            // on error should we throw an exception?

            // I think so, a custom exception called CompileFileException
        }
示例#3
0
 public abstract void VisitCompileObjectFile(FileElement element);
示例#4
0
 public abstract void VisitCompileObjectFile(FileElement element);