Commit Graph

18 Commits

Author SHA1 Message Date
Casey Rodarmor
e2c0d86bdd
Optional modules and imports (#1797) 2023-12-29 12:16:31 -08:00
Casey Rodarmor
f039701f71
Expand tilde in import and module paths (#1792) 2023-12-29 02:08:02 +00:00
Casey Rodarmor
8ea278c58b
Override imported recipes (#1790) 2023-12-28 17:34:37 -08:00
Casey Rodarmor
a1bd70a030
Run recipes with working directory set to submodule directory (#1788) 2023-12-29 00:55:36 +00:00
Casey Rodarmor
94b3af6cb7
Allow mod statements with path to source file (#1786) 2023-12-28 12:23:58 +00:00
Casey Rodarmor
316ea01295
Add modules (#1782) 2023-12-28 04:27:15 +00:00
Casey Rodarmor
e9bec8d398
Stabilize !include path as import 'path' (#1771) 2023-12-20 12:31:51 +08:00
Casey Rodarmor
92bae080ab
List included recipes in load order (#1745) 2023-11-25 07:15:41 +00:00
Casey Rodarmor
09a39055ba
Rename Justfile::first → Justfile::default (#1741) 2023-11-22 18:33:55 +00:00
Casey Rodarmor
ab16c0493f
Don't default to included recipes (#1740) 2023-11-22 18:27:49 +00:00
Casey Rodarmor
7337447d42
Add file paths to error messages (#1737) 2023-11-22 04:17:38 +00:00
Greg Shuflin
f745316e88
Move !include processing into compiler (#1618) 2023-11-21 11:28:59 -08:00
Greg Shuflin
054d6672c5
Analyze and Compiler tweaks (#1534) 2023-01-27 03:03:04 +00:00
Greg Shuflin
6ab6588549
Borrow Ast in Analyser (#1527) 2023-01-25 04:06:33 +00:00
Casey Rodarmor
01fae9b1e4
Do use super::*; instead of use crate::common::*; (#1239) 2022-06-19 04:56:31 +00:00
Casey Rodarmor
1b0fafea75
Add loader and refactor errors (#917)
This commit adds a `Loader` type, which can be used to load multiple
source strings. This was done to support the work on modules, but
coincidentally enabled consolidating errors, since now `Config::run`
can take a `&Loader`, and in the event of an error, return and `Error`
that borrows from loaded strings. Multiple error types have been
consolidated, and a bunch of ad-hoc error printing was removed.
2021-07-26 01:26:06 -07:00
Casey Rodarmor
aefdcea7d0
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
  to be implicitly inherited by subprocesses, we now use
  `Command::current_dir` to set it explicitly. This feels much better,
  since we aren't dependent on the implicit state of the process's
  current directory.

- Subcommand execution is much improved.

- Added a ton of tests for config parsing, config execution, working
  dir, and search dir.

- Error messages are improved. Many more will be colored.

- The Config is now onwed, instead of borrowing from the arguments and
  the `clap::ArgMatches` object. This is a huge ergonomic improvement,
  especially in tests, and I don't think anyone will notice.

- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
  matching git, which I think is what most people will expect.

- Added a cute `tmptree!{}` macro, for creating temporary directories
  populated with directories and files for tests.

- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00
Casey Rodarmor
b2285ce0e0
Reform Parser (#509)
Just's first parser performed both parsing, i.e the transformation of a
token stream according to the language grammar, and a number of consistency
checks and analysis passes.

This made parsing and analysis quite complex, so this diff introduces a
new, much cleaner `Parser`, and moves existing analysis into a dedicated
`Analyzer`.
2019-11-07 10:55:15 -08:00