Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename package #2

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ read more [in the blog](https://bishabosha.github.io/articles/simple-parsing-wit
## Basic usage

```scala
import regexglob.RegexGlobbing.r
import stringmatching.regex.Interpolators.r

"[23, 56, 71]" match
case r"[${r"$xs%d"}...(, )]" => xs.sum // 150
Expand Down
4 changes: 1 addition & 3 deletions _docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

Currently all functionality is accessed with one import:
```scala
import regexglob.RegexGlobbing.r
import stringmatching.regex.Interpolators.r
```

> the exact namespace for the final library will likely change.

A simple example can be illustrated here, where we parse some basic text representing a sequence of integers, delimited by `"["` and `"]"`, and separated by `", "`.
In one pattern, you can extract a typed value `xs: IndexedSeq[Int]` as follows:

Expand Down
28 changes: 14 additions & 14 deletions project.scala
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Main
//> using scala "3.4.0-RC3"
//> using test.dep org.scalameta::munit:1.0.0-M10
//> using options -siteroot ${.}
//> using options -project enhanced-string-interpolator
//> using publish.organization "io.github.bishabosha"
//> using publish.name "enhanced-string-interpolator"
//> using publish.license "Apache-2.0"
//> using publish.versionControl "github:bishabosha/enhanced-string-interpolator"
//> using publish.url "https://github.com/bishabosha/enhanced-string-interpolator"
//> using publish.developer "bishabosha|Jamie Thompson|https://github.com/bishabosha"
//> using options -project enhanced-string-interpolator -siteroot ${.}

//> using publish.ci.computeVersion "git:tag"
//> using publish.ci.repository "central-s01"
//> using publish.ci.user "env:PUBLISH_USER"
//> using publish.ci.password "env:PUBLISH_PASSWORD"
//> using publish.ci.publicKey "env:PUBLISH_PUBLIC_KEY"
//> using publish.ci.repository "central-s01"
//> using publish.ci.secretKey "env:PUBLISH_SECRET_KEY"
//> using publish.ci.secretKeyPassword "env:PUBLISH_SECRET_KEY_PASSWORD"
//> using publish.ci.publicKey "env:PUBLISH_PUBLIC_KEY"

//> using publish.ci.user "env:PUBLISH_USER"
//> using publish.developers "bishabosha|Jamie Thompson|https://github.com/bishabosha"
//> using publish.license "Apache-2.0"
//> using publish.name "enhanced-string-interpolator"
//> using publish.organization "io.github.bishabosha"
//> using publish.url "https://github.com/bishabosha/enhanced-string-interpolator"
//> using publish.vcs "github:bishabosha/enhanced-string-interpolator"

// currently the compiler crashes in 3.3.1, so we use 3.4.0-RC3
// Test
//> using test.dependency "org.scalameta::munit:1.0.0-M10"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package regexglob
package stringmatching.regex

import quoted.*
import scala.annotation.compileTimeOnly
Expand All @@ -8,7 +8,7 @@ import scala.util.boundary, boundary.break
import scala.collection.immutable.ArraySeq
import scala.annotation.tailrec

object RegexGlobbing:
object Interpolators:
extension (inline sc: StringContext)
/** use in patterns like `case r"$foo...(, )" =>` */
@compileTimeOnly("should be used with `r` pattern interpolator")
Expand Down Expand Up @@ -338,4 +338,4 @@ object RegexGlobbing:
}
end match
end rsUnapplyExpr
end RegexGlobbing
end Interpolators
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package regexglob
package example

import RegexGlobbing.r
import stringmatching.regex.Interpolators.r

class ExampleSuite extends munit.FunSuite:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package regexglob
package example

import RegexGlobbing.r
import stringmatching.regex.Interpolators.r

import scala.compiletime.testing.typeCheckErrors

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package regexglob
package example

import RegexGlobbing.r
import stringmatching.regex.Interpolators.r

class ResultTypesSuite extends munit.FunSuite:

Expand Down
Loading