elvish/pkg/parse
Qi Xiao 96752afa4d Make struct maps indistinguishable from maps to Elvish code.
Struct map is a mechanism to let Go code expose simple structs to Elvish code.
The difference between struct maps and maps is convenience for Go code; they
also have different performance characteristics, but since struct maps are
always quite small, the difference is not meaningful for Elvish's use cases.

As a result, there is no good reason that Elvish code needs to be aware of the
difference between struct maps and normal maps. Making them indistinguishable to
Elvish code simplifies the language.

This commit does the following:

- Change Equal, Hash, Kind and Repr to treat struct maps like maps.

- Change Assoc and Dissoc to "promote" struct maps to maps.

- Remove the custom Repr method of parse.Source.

- Update documentation to reflect this change.
2023-07-14 23:57:38 +01:00
..
cmpd Move pkg/edit/complete/node_path.go into new package pkg/parse/np. 2023-04-22 22:25:01 +01:00
np pkg/lsp: Return doc when hovering on the first character of a symbol. 2023-04-23 00:27:41 +01:00
parseutil pkg/lsp: Use pkg/parse/np to find the symbol to look up doc for. 2023-04-22 22:35:54 +01:00
testdata/fuzz/FuzzParse Actually fix the O(2^n) code path. 2022-01-01 22:52:56 +00:00
check_ast_test.go interface{} -> any now that Elvish requires Go 1.18. 2022-03-20 16:17:19 +00:00
check_parse_tree_test.go pkg/parse: Turn most public methods of Node into functions. 2020-04-25 18:55:44 +01:00
fuzz_test.go Remove go1.18 build tags as 1.18 is required. 2022-08-08 12:29:33 +01:00
node.go Change module import path to src.elv.sh 2021-01-27 01:30:25 +00:00
parse_test.go Generalize parse.Errors and move it to diag. 2022-11-30 01:05:16 +00:00
parse.go Generalize parse.Errors and move it to diag. 2022-11-30 01:05:16 +00:00
parser.go Generalize parse.Errors and move it to diag. 2022-11-30 01:05:16 +00:00
pprint_test.go Don't dot import pkg/tt 2022-06-04 23:39:19 +01:00
pprint.go interface{} -> any now that Elvish requires Go 1.18. 2022-03-20 16:17:19 +00:00
quote_test.go Fixup for #1531. 2022-06-11 21:26:32 +01:00
quote.go Fixup for #1531. 2022-06-11 21:26:32 +01:00
source_test.go Make struct maps indistinguishable from maps to Elvish code. 2023-07-14 23:57:38 +01:00
source.go Make struct maps indistinguishable from maps to Elvish code. 2023-07-14 23:57:38 +01:00
testutil_test.go Generalize parse.Errors and move it to diag. 2022-11-30 01:05:16 +00:00
zstring.go pkg/md: Generate String method for OpType. 2022-10-15 11:39:27 +01:00