Skip to content

Commit

Permalink
Merge de4ac54 into 229b804
Browse files Browse the repository at this point in the history
  • Loading branch information
Khoyo committed May 30, 2018
2 parents 229b804 + de4ac54 commit afd3a94
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions camisole/languages/__init__.py
Expand Up @@ -51,6 +51,7 @@ def load_from_environ():
'pascal',
'perl',
'php',
'prolog',
'python',
'ruby',
'rust',
Expand Down
9 changes: 9 additions & 0 deletions camisole/languages/prolog.py
@@ -0,0 +1,9 @@
from camisole.models import Lang, Program


class Prolog(Lang):
source_ext = '.pl'
interpreter = Program('swipl',
opts=['--quiet', '-t', 'halt'],
version_opt='--version')
reference_source = r":- write('42\n')."
3 changes: 3 additions & 0 deletions camisole/models.py
Expand Up @@ -240,6 +240,9 @@ def source_filename(self):
return 'source' + self.source_ext

def execute_filename(self):
if self.compiler is None and self.source_ext:
return 'compiled' + self.source_ext

return 'compiled'

@staticmethod
Expand Down

0 comments on commit afd3a94

Please sign in to comment.