File tree Expand file tree Collapse file tree 2 files changed +48
-6
lines changed
Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Original file line number Diff line number Diff line change @@ -2539,17 +2539,18 @@ plainname ::= <label>
25392539 | '[method]' <label> '.' <label>
25402540 | '[static]' <label> '.' <label>
25412541label ::= <first-fragment> ( '-' <fragment> )*
2542- first-fragment ::= [a-z] <word>
2543- | [A-Z] <acronym>
2542+ first-fragment ::= <first-word>
2543+ | <first-acronym>
2544+ first-word ::= [a-z] [0-9a-z]*
2545+ first-acronym ::= [A-Z] [0-9A-Z]*
25442546fragment ::= <word>
25452547 | <acronym>
2546- word ::= [0-9a-z]*
2547- acronym ::= [0-9A-Z]*
2548+ word ::= [0-9a-z]+
2549+ acronym ::= [0-9A-Z]+
25482550interfacename ::= <namespace> <label> <projection> <interfaceversion>?
25492551 | <namespace>+ <label> <projection>+ <interfaceversion>? 🪺
25502552namespace ::= <words> ':'
2551- words ::= <word>
2552- | <words> '-' <word>
2553+ words ::= <first-word> ( '-' <word> )*
25532554projection ::= '/' <label>
25542555interfaceversion ::= '@' <valid semver>
25552556 | '@' <canonversion> 🔗
Original file line number Diff line number Diff line change 88 (import " B-1" (func ))
99 (import " B-1-C-2-D-3" (func ))
1010 (import " a11-B11-123-ABC-abc" (func ))
11+ (import " ns-1-a:b-1-c/D-2" (func ))
1112))
1213(assert_invalid
1314 (component
1718 (component
1819 (import " 1-a" (func )))
1920 " is not in kebab case" )
21+ (assert_invalid
22+ (component
23+ (import " " (func )))
24+ " is not in kebab case" )
25+ (assert_invalid
26+ (component
27+ (import " a-" (func )))
28+ " is not in kebab case" )
29+ (assert_invalid
30+ (component
31+ (import " a--" (func )))
32+ " is not in kebab case" )
33+ (assert_invalid
34+ (component
35+ (import " 1:a/b" (func )))
36+ " is not in kebab case" )
37+ (assert_invalid
38+ (component
39+ (import " A:b/c" (func )))
40+ " is not a valid extern name" )
41+ (assert_invalid
42+ (component
43+ (import " 1:b/c" (func )))
44+ " is not a valid extern name" )
45+ (assert_invalid
46+ (component
47+ (import " ns-A:b/c" (func )))
48+ " is not a valid extern name" )
49+ (assert_invalid
50+ (component
51+ (import " ns:A/b" (func )))
52+ " is not a valid extern name" )
53+ (assert_invalid
54+ (component
55+ (import " ns:1/a" (func )))
56+ " is not a valid extern name" )
57+ (assert_invalid
58+ (component
59+ (import " ns:pkg-A/b" (func )))
60+ " is not a valid extern name" )
You can’t perform that action at this time.
0 commit comments