Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion parse_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'.js': 'node',
'.hs': 'haskell',
'.exs': 'elixir',
'.php': 'php',
}

COMMENT_PREFIX = {
Expand All @@ -23,6 +24,7 @@
'node': '//',
'haskell': '--',
'elixir': '#',
'php': '//'
}


Expand Down Expand Up @@ -58,7 +60,8 @@ def parse(path):
glob('*.js') + \
glob('*.pl') + \
glob('*.hs') + \
glob('*.exs')
glob('*.exs') + \
glob('*.php')

for f in files:
ext_name = os.path.splitext(f)[1]
Expand Down
6 changes: 4 additions & 2 deletions run_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
'node',
'golang',
'elixir',
'haskell']
'haskell',
'php']

RUN_CMDS = {
'ruby': 'ruby',
Expand All @@ -23,7 +24,8 @@
'perl': 'perl',
'golang': 'go run',
'elixir': 'elixir',
'haskell': 'runhaskell'}
'haskell': 'runhaskell',
'php': 'php'}


def run_fun(path, func):
Expand Down
5 changes: 5 additions & 0 deletions test/func_samples/function.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

// GET /test/result/php.json

echo json_encode(['hello' => 'world']);