From 829e49647ffa465786ea1d08e409faa75e1036cb Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 7 Sep 2025 23:10:07 -0400 Subject: Add print and keys functions, fix example --- site/spec.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/site/spec.html b/site/spec.html index c394982..c8b3c6e 100644 --- a/site/spec.html +++ b/site/spec.html @@ -528,10 +528,21 @@ which contains a key x matching j.* must also contain load_path(path: String) -> Configuration
Convenience function for loading by path (may be overloaded with load if language supports it). +
  • + print(conf: Configuration)
    + Print key = value on a separate line for each key in conf, + sorted alphabetically by key. The value format doesn’t need to match POM’s format exactly, + since this function should only be used for debugging anyways. +
  • has(conf: Configuration, key: String) -> Bool
    Returns whether key is associated with any value.
  • +
  • + keys(conf: Configuration) -> List<String>
    + Returns a list of all unique first components of keys in the configuration, + in an arbitrary order. +
  • location(conf: Configuration, key: String) -> Optional<Location>
    Location of the definition of key in the configuration (file and line number). @@ -665,7 +676,7 @@ font-size = 18 [file-extensions] C = .c -C++ = .cpp, .h, .hpp +Cpp = .cpp, .h, .hpp [plug-in.edit-over-ssh] path = ~/misc/edit-over-ssh.so @@ -693,7 +704,7 @@ This configuration has the following mapping of keys to values: tab-size4 font-size18 file-extensions.C.c - file-extensions.C++.cpp, .h, .hpp + file-extensions.Cpp.cpp, .h, .hpp plug-in.edit-over-ssh.path~/misc/edit-over-ssh.so plug-in.edit-over-ssh.enabledyes plug-in.edit-over-ssh.settings.favourite-hostmy-web-server @@ -741,8 +752,8 @@ default = 14 [file-extensions] C.type = List[String] C.default = .c, .h -C++.type = List[String] -C++.default = .cpp, .hpp, .cc, .hh +Cpp.type = List[String] +Cpp.default = .cpp, .hpp, .cc, .hh C-sharp.type = List[String] C-sharp.default = .cs -- cgit v1.2.3