Commit 437e851a authored by John van Groningen's avatar John van Groningen

fix searching of fields for records with strict or boxed arrays

parent 533eac48
Pipeline #17633 failed with stages
in 49 seconds
......@@ -687,13 +687,34 @@ Record imp cleanid imports input
NextFields :: !Bool !String !(List String) !(Input a) -> (!Input a, !List String,!IdentifierPositionList) | ScanInput a;
NextFields imp cleanid imports input
| sym.repr==CommaSymID
= Record imp cleanid imports input1;
| sym.repr<>SemiColonSymID && sym.repr<>OpenBraceSymID && sym.repr<>EofSymID
= NextFields imp cleanid imports input1;
= SkipToDefinition imp cleanid imports sym input1;
where
(input1,sym,_,_) = ScanInput input;
# (input,sym=:{repr},_,_) = ScanInput input;
| repr==CommaSymID
= Record imp cleanid imports input;
| repr==OpenBraceSymID
# (input,sym=:{repr,string},_,_) = ScanInput input;
| repr==HashSymID || (repr==IdentFunnySymID && size string>0 && (string.[0]=='!' || string.[0]=='#'))
= array_brace_sym sym 1 imp cleanid imports input;
= braces_sym sym 1 imp cleanid imports input;
| repr<>SemiColonSymID && repr<>EofSymID
= NextFields imp cleanid imports input;
= SkipToDefinition imp cleanid imports sym input;
where
array_brace_sym :: !Symbol !Int !Bool !String !(List String) !(Input a) -> (!Input a, !List String,!IdentifierPositionList) | ScanInput a;
array_brace_sym {repr} nesting imp cleanid imports input
| repr==CloseBraceSymID
| nesting==1
= NextFields imp cleanid imports input;
= array_brace_sym_next (dec nesting) imp cleanid imports input;
| repr==OpenBraceSymID
= array_brace_sym_next (inc nesting) imp cleanid imports input;
| repr==EofSymID
= (input,imports,PosNil);
= array_brace_sym_next nesting imp cleanid imports input;
array_brace_sym_next :: !Int !Bool !String !(List String) !(Input a) -> (!Input a, !List String,!IdentifierPositionList) | ScanInput a;
array_brace_sym_next nesting imp cleanid imports input
# (input,sym,_,_) = ScanInput input;
= array_brace_sym sym nesting imp cleanid imports input;
InfixConstructors :: !Bool !String !(List String) !(Input a) -> (!Input a, !List String,!IdentifierPositionList) | ScanInput a;
InfixConstructors imp cleanid imports input
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment