Commit graph

98 commits

Author SHA1 Message Date
Dzuchun
6d457332bc Massive work chunk I don't want to cetegorize
API is not stable now anyway, so whatever

- Most `Selci` kinds can be seeded now
- Most `Selci` kinds can iterate over their sub`Selci`
2024-08-25 20:05:22 +03:00
Dzuchun
428eb13f74 minor formatting 2024-08-25 20:04:20 +03:00
Dzuchun
639f2f9692 Made my span struct compatible with miette's one 2024-08-25 20:03:17 +03:00
Dzuchun
1e4ae30f5a Added seeding functions for Span
Now span can be seeded as a plain text or as an ident
2024-08-25 20:02:43 +03:00
Dzuchun
3c8a296f56 Changed Idt type
Since creating DSTs is apparently hard, it's a wrapper around `&str` now
2024-08-25 19:57:16 +03:00
Dzuchun
b6ca2f16e6 Incorporated miette into the existing error type 2024-08-25 19:51:05 +03:00
Dzuchun
3b6498eebf Added miette ecosystem
My goal was to not break `no_std` support with them, so after some time
I've finally found `miette` and `thiserror` forks that seem to suppoert
`no_std`
2024-08-25 19:46:24 +03:00
Dzuchun
1c92b8742e Added a bunch of features to derive-more 2024-08-25 19:44:53 +03:00
Dzuchun
0bd354d6c2 Added default feature
(just for the sake of it)
2024-08-25 19:44:13 +03:00
Dzuchun
4e6b7780c6 Added kyomato-util crate
Immutable: decently transparent wrapper type arond anything that
prevents it from being modified.
Intended for guarantee uphold - some fields of the struct are not meant
to be mutated
2024-08-25 19:38:23 +03:00
Dzuchun
c89e6a0ed7 Defined InnerSelci for most Selci types 2024-08-25 08:09:22 +03:00
Dzuchun
1663522dc0 Implemented basic code span 2024-08-25 08:08:19 +03:00
Dzuchun
c0505b1c3a Make kyomato-core a no_std crate with alloc 2024-08-25 08:07:30 +03:00
Dzuchun
a04dcba4d1 Move SelciTree to a dedicated file 2024-08-25 08:04:54 +03:00
Dzuchun
940846a31a Refined Selci definitions
Now each `Selci` kind is stored in a separate module
2024-08-24 22:17:47 +03:00
Dzuchun
b56d423893 Removed newline from example input
It's an accidental change, but it's a good one, so why not?
2024-08-24 21:06:26 +03:00
Dzuchun
b00956c91d Started Token rework
- `Token`s are called `Selci` (selshi) now
- `Selci` do not own or statically refer to their data. Instead they
  only contain some sort of span
- `Selci` are collected into `SelciTree` used to tranverse the AST
- All base `Selci`-related stuff (like their definitions, `SelciTree`
  ddefinintion, convenience macro creation deifnition `SenciTree`
  traversal, etc) are now to be separated into a dedicated crate
  `kyomato-core`
- For more details on rework, see temporary item in `kyomato-core/lib.rs`
2024-08-24 21:01:54 +03:00
Dzuchun
ff751a30e4 It turns out, that file WAS important after all
(one of the examples was using it)
Revert "I have no idea what this file was for,"
This reverts commit dbc3f64912.
2024-08-24 13:44:14 +03:00
Dzuchun
4b09e17139 Renamed binary crate to kyomato-cli
because it makes sense.
2024-08-24 11:58:44 +03:00
Dzuchun
cd2a25ad77 clippy fixes except clippy::too_many_lines
These are much harder to solve, and that's exactly what I'm going to do
now. Basically, it's finally time to refactor `kyomato` into several crates.
2024-08-24 11:55:46 +03:00
Dzuchun
dbc3f64912 I have no idea what this file was for,
let's hope it wasn't important
2024-08-24 11:44:24 +03:00
Dzuchun
3f89050cb4 Updated expected output of integration tests 2024-08-23 18:50:08 +03:00
Dzuchun
d1e83d432c Random formatting a some leftover syntax I forgot
This commit and a couple before represent a set of random additions I've
made to the code, while utilizing it.
I guess, I've learned my lesson now, so I'll make sure to commit these
changes ASAP instead.
2024-08-23 18:37:12 +03:00
Dzuchun
2aba712c8d Added new generator: Compact Latex
Designed to generate latex that compiles into very information-dense
document. Was implemented for the sole reason of generating cheatsheets
2024-08-23 18:34:01 +03:00
Dzuchun
0aaf494eab Random additional tests and formatting 2024-08-23 18:29:07 +03:00
Dzuchun
1f61332ef3 Some other part of meta collection rework 2024-08-23 18:15:06 +03:00
Dzuchun
8003254d1e Allowed '0' in idents 2024-08-23 18:10:10 +03:00
Dzuchun
6ea3288cf0 Footnote content parsing fix 2024-08-23 18:09:32 +03:00
Dzuchun
86bb0ad4c2 PrimitiveDecimal enhancements and edge-cases 2024-08-23 18:08:04 +03:00
Dzuchun
42a1c49045 Addition to "Reworked meta collection" commit
I was quite sure that I've commited it...
Oh well, still getting used to `nvim`
2024-08-23 18:05:12 +03:00
Dzuchun
04e87496e3 Allowed ayano to parse output as a token 2024-08-23 17:59:25 +03:00
Dzuchun
235fbadda7 Added pagebreak before code section in laba-latex 2024-08-23 17:55:41 +03:00
Dzuchun
99645be536 Handled missing language to "minted" blocks
Apparently, language parameter is mandatory, so "text" should be passed
in by default
2024-08-23 17:53:46 +03:00
Dzuchun
acdcd5693e Handled '\' and '%' in laba-latex paragraphs
Most likely you do not intend to define latex comment while writing '%'
inside the paragraph
2024-08-23 17:52:10 +03:00
Dzuchun
da4b8aad2b Added negative alignment to tables in laba-latex 2024-08-23 17:50:40 +03:00
Dzuchun
fafc1e4e41 Reworked meta collection 2024-08-23 17:49:20 +03:00
Dzuchun
5b799d12b6 Added monospace formatting 2024-08-23 17:39:20 +03:00
Dzuchun
78bdd83e2c Reworked python error
Error contains actual python trace and full module source now
2024-08-23 14:16:59 +03:00
Dzuchun
e6ad2d9645 Added QM bra-ket support to Lab generator 2024-08-23 13:43:50 +03:00
Dzuchun
481fd3a419 A lot of changes, really
- Renamed main crate to `kyomato-lib`, while `kyomato` name was given to a nested crate that contains an actual `Kyomato` cli
- Created a helper script for easier `Kyomato usage`, check docs for details
- Added a bit of description for the script
2024-03-30 01:29:55 +02:00
Dzuchun
922581cb5d Added most of the title doc 2024-03-29 00:32:11 +02:00
Dzuchun
aa0583b66a Added example with title info
(no, I won't disclose said subreddit, you can probably reverse-engineer it yourself)
2024-03-28 16:21:07 +02:00
Dzuchun
887ee56ab4 Added usage of dynamic file locations to example 2024-03-28 12:19:48 +02:00
Dzuchun
e541d952b1 Complied with all the tests 2024-03-28 12:02:47 +02:00
Dzuchun
3a9a339e07 Added example with advance Ayano syntax 2024-03-28 10:51:05 +02:00
Dzuchun
a7cf8ca86d Added an example for basic Ayano syntax 2024-03-27 16:47:19 +02:00
Dzuchun
2b41880c8c will this fix it? 2024-03-27 11:06:35 +02:00
Dzuchun
a00371ad93 My bad; that should actually fix it 2024-03-27 11:00:07 +02:00
Dzuchun
e1f8aa6924 Fixed issue of displayed code blocks have hash-dependent (hence - non-deterministic) write order.
It's a workaround rn, but it will be much more refined, once shared storage is implemented
2024-03-27 10:48:54 +02:00
Dzuchun
f5f5d77f12 Repaired example for basic syntax
- fixed issue of some latex tokens begin allergic to \newlive thing
- added more params to `minted` code blocks, so they would look more readable
- added support for cyrillic and latin lists
- fixed parsing issue related to lists begin parsed incorrectly
2024-03-27 09:41:34 +02:00