diff --git a/TODO.md b/TODO.md index 9920919..58cf912 100644 --- a/TODO.md +++ b/TODO.md @@ -10,7 +10,6 @@ - Commands to list constants, units, and substitutions - Documentation (usage) - Documentation (comments) - - Build.rs for constants - Print with highlighting - Cleanup tests, test commands, test units, trig/function tests - Releases @@ -64,7 +63,6 @@ - Print units with powers instead of / - HMS for degrees - Exact radians, using pi constant? - - Constant toml file (update doc in units.toml) - Weird units: flops, lumen, lux, bel ## Bonus diff --git a/buildscript/constants.toml b/buildscript/constants.toml index 450c1a0..4da68cd 100644 --- a/buildscript/constants.toml +++ b/buildscript/constants.toml @@ -1,3 +1,12 @@ +# This file defines all constants daisy knows about. +# Each is an entry in the `constant` array. +# +# Parameters: +# enum_name: capitalized string. Name of this constant's enum. +# strings: string or string array. What strings will be parsed as this constant. +# The first entry in this array tells daisy how to print this constant. +# value: value of this constant. Will be evaluated just like user input. +# unit: true if this constant represents a "fake unit" [[constant]] enum_name = "Pi" diff --git a/buildscript/units.toml b/buildscript/units.toml index 12eb3df..db77951 100644 --- a/buildscript/units.toml +++ b/buildscript/units.toml @@ -1,5 +1,6 @@ # This file defines all units daisy knows about. # Each unit is an entry in the `unit` array. +# Some "units" are constants (mph, for example). They are defined in the "constants" file. # # # Basic properties: