diff --git a/etc/config/hylo.defaults.properties b/etc/config/hylo.defaults.properties new file mode 100644 index 000000000..2d64f14c6 --- /dev/null +++ b/etc/config/hylo.defaults.properties @@ -0,0 +1,4 @@ +compilers=/Users/demarco/dev/hylo/hylo-fork/.build/release/hc +supportsBinary=true +compilerType=hylo +objdumper=objdump diff --git a/etc/config/val.defaults.properties b/etc/config/val.defaults.properties deleted file mode 100644 index ff5404a86..000000000 --- a/etc/config/val.defaults.properties +++ /dev/null @@ -1,4 +0,0 @@ -compilers=/Users/demarco/dev/val/val/.build/release/valc -supportsBinary=true -compilerType=val -objdumper=objdump diff --git a/examples/val/default.val b/examples/hylo/default.hylo similarity index 98% rename from examples/val/default.val rename to examples/hylo/default.hylo index 518682b72..00dc2e53a 100644 --- a/examples/val/default.val +++ b/examples/hylo/default.hylo @@ -4,4 +4,4 @@ public fun factorial(_ n: Int) -> Int { public fun main() -> Int32 { Int32(factorial(5)) -} \ No newline at end of file +} diff --git a/lib/compilers/_all.ts b/lib/compilers/_all.ts index 03593ba60..bf87d110c 100644 --- a/lib/compilers/_all.ts +++ b/lib/compilers/_all.ts @@ -68,6 +68,7 @@ export {GolangCompiler} from './golang.js'; export {HaskellCompiler} from './haskell.js'; export {HLSLCompiler} from './hlsl.js'; export {HookCompiler} from './hook.js'; +export {HyloCompiler} from './hylo.js'; export {ISPCCompiler} from './ispc.js'; export {JaktCompiler} from './jakt.js'; export {JavaCompiler} from './java.js'; @@ -122,7 +123,6 @@ export {Win32MingWGcc} from './win32-mingw-gcc.js'; export {Win32MingWClang} from './win32-mingw-clang.js'; export {WineVcCompiler} from './wine-vc.js'; export {WslVcCompiler} from './wsl-vc.js'; -export {ValCompiler} from './val.js'; export {ZigCC} from './zigcc.js'; export {ZigCompiler} from './zig.js'; export {ZigCXX} from './zigcxx.js'; diff --git a/lib/compilers/val.ts b/lib/compilers/hylo.ts similarity index 93% rename from lib/compilers/val.ts rename to lib/compilers/hylo.ts index f2d3421ba..ed358f7e2 100644 --- a/lib/compilers/val.ts +++ b/lib/compilers/hylo.ts @@ -9,9 +9,9 @@ import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.in // - execute the compiler.exe with the arguments from OptionsForFilter() and adding inputFilename // - be aware that the language class is only instanced once, so storing state is not possible -export class ValCompiler extends BaseCompiler { +export class HyloCompiler extends BaseCompiler { static get key() { - return 'val'; + return 'hylo'; } override optionsForFilter( diff --git a/lib/languages.ts b/lib/languages.ts index cc2122eef..bb529ff8d 100644 --- a/lib/languages.ts +++ b/lib/languages.ts @@ -384,6 +384,17 @@ const definitions: Record = { previewFilter: null, monacoDisassembly: null, }, + hylo: { + name: 'Hylo', + monaco: 'hylo', + extensions: ['.hylo'], + alias: [], + logoUrl: 'hylo.svg', + logoUrlDark: null, + formatter: null, + previewFilter: null, + monacoDisassembly: null, + }, ispc: { name: 'ispc', monaco: 'ispc', @@ -659,17 +670,6 @@ const definitions: Record = { previewFilter: null, monacoDisassembly: 'nc', }, - val: { - name: 'Val', - monaco: 'val', - extensions: ['.val'], - alias: [], - logoUrl: 'val.svg', - logoUrlDark: null, - formatter: null, - previewFilter: null, - monacoDisassembly: null, - }, vala: { name: 'Vala', monaco: 'vala', diff --git a/static/modes/_all.ts b/static/modes/_all.ts index ac00f1729..178358cfc 100644 --- a/static/modes/_all.ts +++ b/static/modes/_all.ts @@ -47,6 +47,7 @@ import './gccdump-rtl-gimple-mode'; import './haskell-mode'; import './hlsl-mode'; import './hook-mode'; +import './hylo-mode'; import './ispc-mode'; import './jakt-mode'; import './llvm-ir-mode'; @@ -59,6 +60,5 @@ import './openclc-mode'; import './ptx-mode'; import './spirv-mode'; import './v-mode'; -import './val-mode'; import './vala-mode'; import './zig-mode'; diff --git a/static/modes/val-mode.ts b/static/modes/hylo-mode.ts similarity index 98% rename from static/modes/val-mode.ts rename to static/modes/hylo-mode.ts index 285482594..69e9467d9 100644 --- a/static/modes/val-mode.ts +++ b/static/modes/hylo-mode.ts @@ -22,8 +22,6 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -import $ from 'jquery'; - import * as monaco from 'monaco-editor'; function definition(): monaco.languages.IMonarchLanguage { @@ -231,7 +229,7 @@ function definition(): monaco.languages.IMonarchLanguage { }; } -monaco.languages.register({id: 'val'}); -monaco.languages.setMonarchTokensProvider('val', definition()); +monaco.languages.register({id: 'hylo'}); +monaco.languages.setMonarchTokensProvider('hylo', definition()); export {}; diff --git a/types/languages.interfaces.ts b/types/languages.interfaces.ts index eacdeb522..8de630be2 100644 --- a/types/languages.interfaces.ts +++ b/types/languages.interfaces.ts @@ -53,6 +53,7 @@ export type LanguageKey = | 'haskell' | 'hlsl' | 'hook' + | 'hylo' | 'ispc' | 'jakt' | 'java' @@ -80,7 +81,6 @@ export type LanguageKey = | 'toit' | 'typescript' | 'v' - | 'val' | 'vala' | 'vb' | 'zig'; diff --git a/views/resources/logos/hylo.svg b/views/resources/logos/hylo.svg new file mode 100644 index 000000000..867dd09d2 --- /dev/null +++ b/views/resources/logos/hylo.svg @@ -0,0 +1,3 @@ + + +