Rename '<sh-define>' to '<sh-defun>' and simplify

This change is already in the syntax document.

* geesh/parser.scm (make-parser): Rename '<sh-define>' to '<sh-defun>'
and use the function name directly instead of making it a singleton
list.
* tests/parser.scm: Update tests.
* .dir-locals.el: Update indentation.
This commit is contained in:
Timothy Sample 2018-10-17 14:40:38 -04:00
parent 2d61e91b27
commit ff14ea0097
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
((scheme-mode
.
((eval . (put '<sh-case> 'scheme-indent-function 1))
(eval . (put '<sh-define> 'scheme-indent-function 1))
(eval . (put '<sh-defun> 'scheme-indent-function 1))
(eval . (put '<sh-exec-let> 'scheme-indent-function 1))
(eval . (put '<sh-for> 'scheme-indent-function 1))
(eval . (put '<sh-until> 'scheme-indent-function 1))

View File

@ -444,7 +444,7 @@ the same number of times.)"
(function-definition
(fname LPAREN! RPAREN! linebreak function-body)
: `(<sh-define> (,$1) ,$5))
: `(<sh-defun> ,$1 ,$5))
(function-body
(compound-command)

View File

@ -304,7 +304,7 @@
;; Functions
(test-equal "Parses functions"
'(<sh-define> ("foo")
'(<sh-defun> "foo"
(<sh-exec> "echo" "foo"))
(parse "foo() { echo foo; }"))