diff options
author | pommicket <pommicket@gmail.com> | 2025-09-07 23:10:07 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-07 23:10:07 -0400 |
commit | 829e49647ffa465786ea1d08e409faa75e1036cb (patch) | |
tree | 890d601a81034d9c575aa86dba0259802d98e7f0 /site | |
parent | 1655c02377dace99defc2a263d78a0071961760a (diff) |
Add print and keys functions, fix example
Diffstat (limited to 'site')
-rw-r--r-- | site/spec.html | 19 |
1 files 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 @@ -529,10 +529,21 @@ which contains a key <i>x</i> matching <i>j</i><code>.*</code> must also contain Convenience function for loading by path (may be overloaded with <code>load</code> if language supports it). </li> <li> + <code>print(conf: Configuration)</code><br> + Print <code>key = value</code> on a separate line for each key in <code>conf</code>, + 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. + </li> + <li> <code>has(conf: Configuration, key: String) -> Bool</code><br> Returns whether <code>key</code> is associated with any value. </li> <li> + <code>keys(conf: Configuration) -> List<String></code><br> + Returns a list of all unique first components of keys in the configuration, + in an arbitrary order. + </li> + <li> <code>location(conf: Configuration, key: String) -> Optional<Location></code><br> Location of the definition of <code>key</code> in the configuration (file and line number). Useful for reporting invalid values when the value format is more complicated than integer/float/boolean. @@ -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: <tr><td>tab-size</td><td>4</td></tr> <tr><td>font-size</td><td>18</td></tr> <tr><td>file-extensions.C</td><td>.c</td></tr> - <tr><td>file-extensions.C++</td><td>.cpp, .h, .hpp</td></tr> + <tr><td>file-extensions.Cpp</td><td>.cpp, .h, .hpp</td></tr> <tr><td>plug-in.edit-over-ssh.path</td><td>~/misc/edit-over-ssh.so</td></tr> <tr><td>plug-in.edit-over-ssh.enabled</td><td>yes</td></tr> <tr><td>plug-in.edit-over-ssh.settings.favourite-host</td><td>my-web-server</td></tr> @@ -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 </code></pre> |