Merge remote-tracking branch 'ni/master'

This commit is contained in:
lassulus 2017-11-15 19:03:13 +01:00
commit 963d14d8d9
2 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ opt-spec: cmd-spec: let
# true if b requires a to define its default value
opts-before = a: b:
test ".*[$]${stringAsChars (c: "[${c}]") a.varname}\\>.*" (b.default or "");
test ".*[$]${stringAsChars (c: "[${c}]") a.varname}([^0-9A-Za-z_].*)?" (b.default or "");
opts-list = let
sort-out = toposort opts-before (attrValues opts);

View File

@ -173,9 +173,13 @@ let {
syn cluster nix_ind_strings contains=NixIND_STRING
syn cluster nix_strings contains=NixSTRING
${concatStringsSep "\n" (mapAttrsToList (lang: { extraStart ? null }: let
${concatStringsSep "\n" (mapAttrsToList (name: {
extraStart ? null,
lang ? name
}:
let
startAlts = filter isString [
''/\* ${lang} \*/''
''/\* ${name} \*/''
extraStart
];
sigil = ''\(${concatStringsSep ''\|'' startAlts}\)[ \t\r\n]*'';