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:
parent
2d61e91b27
commit
ff14ea0097
|
@ -1,7 +1,7 @@
|
||||||
((scheme-mode
|
((scheme-mode
|
||||||
.
|
.
|
||||||
((eval . (put '<sh-case> 'scheme-indent-function 1))
|
((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-exec-let> 'scheme-indent-function 1))
|
||||||
(eval . (put '<sh-for> 'scheme-indent-function 1))
|
(eval . (put '<sh-for> 'scheme-indent-function 1))
|
||||||
(eval . (put '<sh-until> 'scheme-indent-function 1))
|
(eval . (put '<sh-until> 'scheme-indent-function 1))
|
||||||
|
|
|
@ -444,7 +444,7 @@ the same number of times.)"
|
||||||
|
|
||||||
(function-definition
|
(function-definition
|
||||||
(fname LPAREN! RPAREN! linebreak function-body)
|
(fname LPAREN! RPAREN! linebreak function-body)
|
||||||
: `(<sh-define> (,$1) ,$5))
|
: `(<sh-defun> ,$1 ,$5))
|
||||||
|
|
||||||
(function-body
|
(function-body
|
||||||
(compound-command)
|
(compound-command)
|
||||||
|
|
|
@ -304,7 +304,7 @@
|
||||||
;; Functions
|
;; Functions
|
||||||
|
|
||||||
(test-equal "Parses functions"
|
(test-equal "Parses functions"
|
||||||
'(<sh-define> ("foo")
|
'(<sh-defun> "foo"
|
||||||
(<sh-exec> "echo" "foo"))
|
(<sh-exec> "echo" "foo"))
|
||||||
(parse "foo() { echo foo; }"))
|
(parse "foo() { echo foo; }"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue