Skip to content

Commit 01c66d2

Browse files
committed
Fix complex recipe dependencies
1 parent 0a31151 commit 01c66d2

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

Just.sublime-syntax

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,23 @@ contexts:
341341
- include: else-pop
342342

343343
recipe-dependency-with-args:
344+
- match: \(
345+
scope: punctuation.section.group.begin.just
346+
push: recipe-dependency-with-args-body
347+
348+
recipe-dependency-with-args-body:
349+
- meta_scope: meta.group.just
350+
- match: '\b{{valid_name}}'
351+
scope: entity.name.function.just
352+
push:
353+
- include: just-expressions
354+
- include: else-pop
355+
- include: recipe-dependency-group-end
356+
357+
recipe-dependency-group-end:
344358
- match: \)
345359
scope: punctuation.section.group.end.just
346-
pop: 1
347-
- match: '(\()\s*({{valid_name}})\b'
348-
captures:
349-
1: punctuation.section.group.begin.just
350-
2: entity.name.function.just
351-
- include: just-expressions
352-
- include: else-pop
360+
pop: 2 # End dependency group
353361

354362

355363
###[ RECIPE CONTENTS ]#########################################################

tests/syntax_test_just.recipe_declaration.just

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,18 @@ alias-name:
241241
export-name:
242242
# <- meta.function.just entity.name.function.just
243243
#^^^^^^^^^^ meta.function.just entity.name.function.just
244+
245+
build platform host *args:
246+
247+
hostname := 'host'
248+
249+
_build-toplevel platform *args: (
250+
# ^ punctuation.section.group.begin.just
251+
build (platform) (hostname + '.config.system.build.toplevel') (args)
252+
# ^^^^^ entity.name.function.just
253+
# ^^^^^^^^^^ meta.group.just
254+
# ^^^^^^^^ variable.other.just
255+
)
256+
# <- punctuation.section.group.end.just
257+
follow-function:
258+
# <- meta.function.just entity.name.function.just

0 commit comments

Comments
 (0)