-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: nilium/codf
base: main
head repository: nilium/codf
compare: codx
- 10 commits
- 6 files changed
- 1 contributor
Commits on Jun 28, 2019
-
Add Name function to get a section/statement name
This is a convenience function for pulling the value of the token that denotes a statement or section.
Configuration menu - View commit details
-
Copy full SHA for 04b860c - Browse repository at this point
Copy the full SHA 04b860cView commit details -
Add Filter, Last, and First functions under codx
codx is a new subpackage of codf that contains utility functions. Like everything else about codf, the API is currently unstable but unlikely to change drastically. This uses a Filterer to select children of a ParentNode and return them. For example, to get all foo statements in a document root, you'd use `Filter(doc, FilterStatements, FilterNamed("foo"))`. This is a convenience for grabbing relevant elements of an AST in an order that's convenient for iterating thorugh, rather than walking the whole document all at once.Configuration menu - View commit details
-
Copy full SHA for f93571e - Browse repository at this point
Copy the full SHA f93571eView commit details -
Add Start/End AST functions for nodes
These are to get the start and end location of nodes without typing x.Token().Start each time. They're just convenience functions.
Configuration menu - View commit details
-
Copy full SHA for fcff535 - Browse repository at this point
Copy the full SHA fcff535View commit details -
These are utility functions I end up copy/pasting between projects, so I might as well merge them into codx for convenience. - args.go contains simple statement and section argument parsing functions. These will likely change a good deal over time as my ideas aobut how to handle that solidify. - mapping.go contains MapFunc and NodeMapper, which are used to wrap an existing Walker with a mapping function. - include.go contains the IncludeMapper, which implements general purpose `include FILE;` directives. A simple filesystem-based IncludeFunc is provided, but there's no requirement that an IncludeFunc is disk-only. - expand.go provides variable-expansion mappings.
Configuration menu - View commit details
-
Copy full SHA for 94beb83 - Browse repository at this point
Copy the full SHA 94beb83View commit details
Commits on Jul 15, 2019
-
codx: Refactor argument parsing
- Replace hardcoded cases in ParseArg with use of ExprValue (and Value for other cases). This functions similar to flag.Value, except there's no need for it to support fmt.Stringer. - Fix *url.URL type case. Regardless of whether a token fit a URL, a *url.URL output would return an error due to it falling out of its conditional to the error return.
Configuration menu - View commit details
-
Copy full SHA for 2dc98f6 - Browse repository at this point
Copy the full SHA 2dc98f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11ce8e0 - Browse repository at this point
Copy the full SHA 11ce8e0View commit details
Commits on Jul 16, 2019
-
codx: Add double-star argument support
This is mainly for use with protobuf-ish things and code where a concrete zero value has to be distinct from no value (nil).
Configuration menu - View commit details
-
Copy full SHA for 39c2b4d - Browse repository at this point
Copy the full SHA 39c2b4dView commit details
Commits on Jul 18, 2019
-
Add the option to get the token, location, or node in ParseArg
This allows you to just pull a token out for further inspection if ParseArg and an ExprValue isn't really appropriate.
Configuration menu - View commit details
-
Copy full SHA for 87a4774 - Browse repository at this point
Copy the full SHA 87a4774View commit details -
Add AllOf and OneOf ExprValue implementations
These can be used to create first-matching or all-matching sets of arguments. AllOf is often more useful for pulling both the location or token of a node out at the same time as its value so that you can produce an error message. OneOf is useful with **T values where it's useful to use the first non-nil value.
Configuration menu - View commit details
-
Copy full SHA for 752d44e - Browse repository at this point
Copy the full SHA 752d44eView commit details -
Add missing returns for new type cases
Without these, we get expected-but-got errors that're missing information.
Configuration menu - View commit details
-
Copy full SHA for 2b944d1 - Browse repository at this point
Copy the full SHA 2b944d1View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...codx