Skip to content

Commit 1a93414

Browse files
author
Tommaso Previero
committed
Add integration for sml
1 parent ebf87ac commit 1a93414

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ npm-debug.log
33
node_modules
44
examples/test/
55
.sass-cache/
6+
.idea
7+
*.iml

examples/helloworld.sml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
(* My Hello World program *)
3+
print "Hello World!"

lib/grammars/ml.coffee

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{command} = GrammarUtils = require '../grammar-utils'
2+
path = require 'path'
23

34
windows = GrammarUtils.OperatingSystem.isWindows()
45

@@ -28,3 +29,17 @@ module.exports =
2829
file = filename.replace /\.re$/, '.native'
2930
GrammarUtils.formatArgs("rebuild '#{file}' && '#{file}'")
3031
}
32+
33+
'Standard ML':
34+
'File Based': {
35+
command: 'sml'
36+
args: ({filename}) -> return [filename];
37+
}
38+
39+
'Selection Based': {
40+
command: 'sml'
41+
args: (context) ->
42+
code = context.getCode()
43+
tmpFile = GrammarUtils.createTempFileWithCode(code, '.sml')
44+
return [tmpFile]
45+
}

0 commit comments

Comments
 (0)