johnynek / bosatsu

A python-ish pure and total functional programming language
Apache License 2.0
224 stars 11 forks source link

Char literal and patterns #1052

Closed johnynek closed 11 months ago

johnynek commented 11 months ago

close #503

the syntax I am leaning towards is $.{x} to match a single unicode code-point, and ."z" or .'z' to represent a single literal code point. The idea is . reminds us of "point" which reminds us of "code point".

codecov-commenter commented 11 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0fbec80) 91.75% compared to head (d1b518e) 92.03%. Report is 1 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1052 +/- ## ========================================== + Coverage 91.75% 92.03% +0.27% ========================================== Files 93 93 Lines 9726 9866 +140 Branches 2250 2285 +35 ========================================== + Hits 8924 9080 +156 + Misses 802 786 -16 ``` | [Files](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin) | Coverage Δ | | |---|---|---| | [...main/scala/org/bykn/bosatsu/TypedExprToProto.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y2xpL3NyYy9tYWluL3NjYWxhL29yZy9ieWtuL2Jvc2F0c3UvVHlwZWRFeHByVG9Qcm90by5zY2FsYQ==) | `90.08% <100.00%> (+0.10%)` | :arrow_up: | | [.../src/main/scala/org/bykn/bosatsu/Declaration.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L0RlY2xhcmF0aW9uLnNjYWxh) | `99.28% <100.00%> (+0.55%)` | :arrow_up: | | [...ain/scala/org/bykn/bosatsu/DefRecursionCheck.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L0RlZlJlY3Vyc2lvbkNoZWNrLnNjYWxh) | `97.67% <100.00%> (+0.01%)` | :arrow_up: | | [core/src/main/scala/org/bykn/bosatsu/Lit.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L0xpdC5zY2FsYQ==) | `100.00% <100.00%> (ø)` | | | [...re/src/main/scala/org/bykn/bosatsu/Matchless.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L01hdGNobGVzcy5zY2FsYQ==) | `99.55% <100.00%> (+<0.01%)` | :arrow_up: | | [...src/main/scala/org/bykn/bosatsu/PackageError.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1BhY2thZ2VFcnJvci5zY2FsYQ==) | `69.68% <100.00%> (ø)` | | | [core/src/main/scala/org/bykn/bosatsu/Pattern.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1BhdHRlcm4uc2NhbGE=) | `97.36% <100.00%> (+1.36%)` | :arrow_up: | | [core/src/main/scala/org/bykn/bosatsu/Predef.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1ByZWRlZi5zY2FsYQ==) | `92.77% <100.00%> (+0.08%)` | :arrow_up: | | [.../main/scala/org/bykn/bosatsu/SourceConverter.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1NvdXJjZUNvbnZlcnRlci5zY2FsYQ==) | `97.62% <100.00%> (+0.02%)` | :arrow_up: | | [...e/src/main/scala/org/bykn/bosatsu/StringUtil.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1N0cmluZ1V0aWwuc2NhbGE=) | `94.56% <100.00%> (+1.32%)` | :arrow_up: | | ... and [9 more](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin) | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/johnynek/bosatsu/pull/1052/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.