Skip to content

Commit 0f3e047

Browse files
authored
Merge pull request #1503 from eltomato/eltomato/atom-script/sml-integration
SML/NJ Integration
2 parents 0c9e719 + bb93c92 commit 0f3e047

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@ module.exports =
2828
file = filename.replace /\.re$/, '.native'
2929
GrammarUtils.formatArgs("rebuild '#{file}' && '#{file}'")
3030
}
31+
32+
'Standard ML':
33+
'File Based': {
34+
command: 'sml'
35+
args: ({filename}) -> return [filename];
36+
}
37+
38+
'Selection Based': {
39+
command: 'sml'
40+
args: (context) ->
41+
code = context.getCode()
42+
tmpFile = GrammarUtils.createTempFileWithCode(code, '.sml')
43+
return [tmpFile]
44+
}

0 commit comments

Comments
 (0)