Skip to content

Commit

Permalink
Merge pull request #15 from kas-gui/work
Browse files Browse the repository at this point in the history
Update to Kas master (roughly 0.14.0)
  • Loading branch information
dhardy authored Dec 4, 2023
2 parents d669218 + eb9aa59 commit 3e21f9f
Show file tree
Hide file tree
Showing 9 changed files with 551 additions and 644 deletions.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ resolver = "2"
publish = false

[dependencies]
kas = { version = "0.12.0" }
kas = { version = "0.14.0-alpha" }
chrono = "0.4"
env_logger = "0.8"
pest = "2.1"
pest_derive = "2.1"

[patch.crates-io.kas]
git = "https://github.com/kas-gui/kas.git"
rev = "90b19d6847ba1d4185de4605218b05db2b30024e"
10 changes: 6 additions & 4 deletions src/cells.pest
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
WHITESPACE = _{ " " | "\t" }
number = @{
("." ~ ASCII_DIGIT+)
| (ASCII_DIGIT+ ~ ("." ~ ASCII_DIGIT*)?)
~ (^"e" ~ ("+" | "-")? ~ ASCII_DIGIT+)?
("-" | "+")? ~ (
("." ~ ASCII_DIGIT+)
|
(ASCII_DIGIT+ ~ ("." ~ ASCII_DIGIT*)?) ~ (^"e" ~ ("+" | "-")? ~ ASCII_DIGIT+)?
)
}
reference = @{ ASCII_ALPHA ~ ASCII_DIGIT+ }
value = { number | reference | ("(" ~ expression ~ ")") }
Expand All @@ -11,6 +13,6 @@ product = { value ~ (product_op ~ value)* }
sum_op = { "-" | "+" }
summation = { sum_op? ~ product ~ (sum_op ~ product)* }
expression = !{ summation }
formula = ${ SOI ~ "=" ~ WHITESPACE* ~ expression ~ WHITESPACE* }
formula = ${ SOI ~ "=" ~ WHITESPACE* ~ expression ~ WHITESPACE* ~ EOI }
text = @{ !"=" ~ ANY* }
cell = _{ formula | text }
Loading

0 comments on commit 3e21f9f

Please sign in to comment.