mirror of
https://github.com/godotengine/emacs-gdscript-mode.git
synced 2026-01-04 18:09:55 +03:00
Add syntax highlighting for function calls
Closes #30. Pattern: identifier optional_spaces open_parenthesis The implementation uses `"("` instead `(syntax open-parenthesis)` as `open-parenthesis` is defined from `(open-paren (or "{" "[" "("))`. As a result, the regular expression would also highlight array and dictionary variables. The regular expression does highlight signal definitions with parameters, though, as they follow the same pattern of function calls. This could be avoided by ignoring expressions started with "signal" (or by adding a custom rule to highlight signal definitions).
This commit is contained in:
@@ -75,7 +75,12 @@
|
||||
(or "var" "const")
|
||||
(1+ space)
|
||||
(group (1+ (or word ?_))))
|
||||
(1 font-lock-variable-name-face))))
|
||||
(1 font-lock-variable-name-face))
|
||||
;; Function call
|
||||
(,(rx (group (1+ (or word ?_)))
|
||||
(0+ space)
|
||||
"(")
|
||||
(1 font-lock-function-name-face))))
|
||||
|
||||
(defvar gdscript-syntax-table (make-syntax-table))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user