예제 #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);