Commit graph

30153 commits

Author SHA1 Message Date
Anthony Bullard
a2083cec30
Parsing support for snake_case identifiers
In this initial commit, I have done the following:

- Added unit tests to roc_parse's ident.rs file to cover at least the
  simplest Ident enum cases (Tag, OpaqueRef, and simple Access)
- Added '_' as a valid "rest" character in both uppercase and lowercase
  identifier parts
- Updated the test_syntax snapshots appropriately

There is still a lot left to do here. Such as:

- Do we want to allow multiple '_'s to parse successfully?
- Handle qualified access
- Handle accessor functions
- Handle record update functions
- Remove the UnderscoreInMiddle case from BadIdent
- Write unit tests for Malformed Idents

I am not a "Rustacean" by any means, but have been through the Book in
years past.  Any feedback on the way I wrote the tests or any other part
of the implementation would be very appreciated.
2024-12-03 20:50:47 -06:00
Anton-4
d7825428df
fix zulip bot content
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-12-02 17:44:33 +01:00
Anton-4
58825f2a8b
Zulip bot high p issues (#7297)
* zulip issue bot

* disable CI manager for development

* finalize

* forgot comment

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-12-02 17:40:01 +01:00
Sam Mohr
a7168a4ad6
Merge pull request #7238 from smores56/allow-try-in-statements
Allow pure statements that contain early returns
2024-12-02 01:15:24 -05:00
Richard Feldman
12dc39a892
Merge pull request #7293 from roc-lang/drop-dbgs
Convert unused dbg!()s to eprintln!()s
2024-12-02 00:34:01 -05:00
Luke Boswell
f2d6111519
Merge pull request #7280 from Giesch/main
add RoxBox::as_refcount_ptr
2024-12-02 15:52:44 +11:00
Sam Mohr
444becdb01
Remove removed TypedHole usage 2024-12-01 20:11:13 -08:00
Richard Feldman
bc0c9250f9
Convert unused dbg!()s to eprintln!()s
This makes it nicer to work with dbg! normally,
because grepping the code base for dbg!() reveals
only the usages of it that are currently active.
2024-12-01 23:10:35 -05:00
Sam Mohr
0a82f313c3
Merge branch 'main' into allow-try-in-statements 2024-12-01 23:02:41 -05:00
Luke Boswell
89ce3d61d8
add Safety section to roc_box as_refcount_ptr() 2024-12-02 14:31:19 +11:00
Sam Mohr
dea9101f87
Merge pull request #7286 from smores56/fix-early-return-type-issue
Generalize return vars
2024-12-01 22:25:07 -05:00
Luke Boswell
63932350d0
Merge pull request #7288 from faldor20/prevent-language-server-crashes
Prevent compiler errors from terminating the language server process
2024-12-02 14:22:00 +11:00
Eli Dowling
e483f36a59
Merge pull request #7290 from faldor20/basic-tag-completion
Basic tag completion
2024-12-02 13:19:14 +10:00
Luke Boswell
48657a57a8
Merge pull request #7291 from joshuawarner32/reland-fuzzing-fixes-2
Reland fuzzing fixes from #7267
2024-12-02 14:18:07 +11:00
Joshua Warner
f21e3ac373
Merge branch 'main' into reland-fuzzing-fixes-2 2024-12-01 17:12:31 -08:00
Joshua Warner
f7a5f06e5b
Fix a bunch of bugs found in fuzzing 2024-12-01 12:40:19 -08:00
Joshua Warner
5cd38c969f
Fix a couple minor parsing bugs 2024-12-01 12:40:17 -08:00
Joshua Warner
d4301e86a3
Improve parsing of negative + not'd exprs 2024-12-01 12:40:16 -08:00
Joshua Warner
61d885039d
Improve normalization to handle cases found in fuzzing 2024-12-01 12:40:14 -08:00
Joshua Warner
912db1b76b
Fix round-trip parse->fmt->parse for dbg stmts with more than one arg 2024-12-01 12:40:13 -08:00
Joshua Warner
cfd83ffcdf
Add some currently-passing tests 2024-12-01 12:40:08 -08:00
Joshua Warner
085c5e2fe7
Fix nasty perf bug in parsing types 2024-12-01 12:39:47 -08:00
faldor20
b01c516d59
Prevent compiler errors from terminating the language server process 2024-12-02 05:46:41 +10:00
faldor20
4b999050f6
Basic tag completion 2024-12-02 05:38:56 +10:00
Dan Knutson
badba1d9c0
Merge remote-tracking branch 'origin/main' 2024-12-01 12:39:12 -06:00
Eli Dowling
21b555d0b2
Merge pull request #7285 from faldor20/purity-inference-module-params-fixes
Purity inference module params fixes
2024-12-01 22:04:30 +10:00
Sam Mohr
febe95c228
Generalize return vars 2024-12-01 02:24:51 -08:00
Sam Mohr
29c8759bc0
Merge branch 'main' into allow-try-in-statements 2024-12-01 00:35:18 -08:00
faldor20
f3f262574d
Check if a module is using purity inference and enable purity inference effects 2024-12-01 17:16:29 +10:00
faldor20
8549e48d0b
make effectful functions unify properly 2024-12-01 16:09:42 +10:00
Luke Boswell
8b9f122047
Merge pull request #7284 from roc-lang/web-links
fix tutorial styling
2024-12-01 15:50:56 +11:00
Luke Boswell
409d64d8ce
fix tutorial styling 2024-12-01 15:46:43 +11:00
Luke Boswell
8acd31e8f0
Merge pull request #7283 from gamebox/fix-issue-7175-check-crashing-on-module
Add platform data for a check run with a single file
2024-12-01 15:15:03 +11:00
Luke Boswell
d7556be7bf
Merge pull request #7264 from shua/saturated
gen-dev: complete Num{Mul,Add,Sub}Saturated impls
2024-12-01 14:01:48 +11:00
Luke Boswell
7cc24cbced
Merge pull request #7277 from shua/jd/powi
Num.powInt: panic on overflow
2024-12-01 13:05:21 +11:00
Anthony Bullard
2b8ef21720 Add platform data for a check run with a single file 2024-11-30 20:02:52 -06:00
shua
5712e265ae
patch: macos arm64, fix gen-llvm i128 bitcode call 2024-12-01 00:02:49 +01:00
shua
8fd2fbc3a1
gen-dev: complete Num{Mul,Add,Sub}Saturated impls
MulSaturated and AddSaturated are now implemented for u128, i128
SubSaturated is now implemented for Dec even if it's a little strange to
saturate at a decimal value:

```
» Num.subSaturated -170_141_183_460_469_231_731dec 1

-170141183460469231731.687303715884105728 : Dec
```

I decided to rm the `build_num_{mul,add}_saturated` methods because
they don't require any asm-specifics. They either call out to bitcode, or
use the non-saturated version for floats.
2024-11-30 23:01:44 +01:00
Dan Knutson
346014d55c
fix rename 2024-11-30 13:33:37 -06:00
Dan Gieschen Knutson
1036695b77
Update crates/roc_std/src/roc_box.rs 2024-11-30 13:08:54 -06:00
Dan Knutson
dccc0f68da
add RoxBox::as_ptr 2024-11-30 13:08:50 -06:00
Anton-4
49ab969ff3
Merge pull request #7279 from roc-lang/revert-7267
Revert PR #7267 fuzzing-bugs-2
2024-11-30 19:35:45 +01:00
Anton-4
74d137cad4
Revert "Merge pull request #7267 from joshuawarner32/fuzzing-bugs-2"
This reverts commit 364249a29d, reversing
changes made to 0e550a7f68.
2024-11-30 18:43:16 +01:00
Richard Feldman
a92cf2fdf9
Merge pull request #7275 from roc-lang/full-width-top-bar
Make the top bar go the full width of docs page
2024-11-30 11:48:05 -05:00
shua
6dfa458e6c
Num.powInt: panic on overflow 2024-11-30 11:26:42 +01:00
Joshua Warner
364249a29d
Merge pull request #7267 from joshuawarner32/fuzzing-bugs-2
Fix a bunch of parser/formatter bugs found in fuzzing
2024-11-29 17:33:57 -08:00
Richard Feldman
855d72b6ba
Put nav last on mobile 2024-11-29 20:20:08 -05:00
Richard Feldman
e9e90ad7ce
Fix overflow-x on <main> 2024-11-29 20:17:59 -05:00
Joshua Warner
ed62bcc15a
Fix a bunch of parser/formatter bugs found in fuzzing
Notably:
* Unified how parens are formatted between (1) when we have a ParensAround, and (2) when we've decided an Apply needs to have parens
* Made unary minus require the be indented to the same level as any other expression continuation. (it used to accidentally have rules meant for binary operators applied)
* Don't apply extra indent to the backpassing continuation in the case that the call does itself require indentation
* Make `try@foo` correctly parse as `try @foo`, so that formatting doesn't change the tree when it adds that space
* Detect more cases where we need to outdent trailing e.g. {} blocks in applies
* Approximately a bagillion other things, 90% of which I added tests for, and none of which affected the formatting of examples or builtins
2024-11-29 16:25:59 -08:00
Richard Feldman
cc919f2f91
Fix docs styling on mobile 2024-11-29 19:08:08 -05:00