File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed
src/main/scala/io/github/windymelt/qw
test/src/scala/io/github/windymelt/qw Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change
1
+ import $ivy .`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
2
+ import de .tobiasroeser .mill .vcs .version .VcsVersion
3
+
1
4
import mill ._ , scalalib ._
5
+ import publish ._
2
6
3
- object qw extends RootModule with ScalaModule {
7
+ object qw extends RootModule with ScalaModule with PublishModule {
4
8
def scalaVersion = " 3.3.0"
5
- def publishVersion = " 0.1.1-SNAPSHOT"
9
+ def pomSettings = PomSettings (
10
+ description = artifactName(),
11
+ organization = " io.github.windymelt" ,
12
+ url = " https://github.com/windymelt/qw.scala" ,
13
+ licenses = Seq (License .MIT ),
14
+ versionControl = VersionControl .github(" windymelt" , " qw.scala" ),
15
+ developers = Seq (
16
+ Developer (" windymelt" , " windymelt" , " https://github.com/windymelt" )
17
+ )
18
+ )
19
+ override def publishVersion : T [String ] = VcsVersion .vcsState().format()
20
+
6
21
object test extends ScalaTests with TestModule .Munit {
7
22
def ivyDeps = Agg (ivy " org.scalameta::munit::0.7.29 " )
8
23
}
Original file line number Diff line number Diff line change 1
1
package io .github .windymelt .qw
2
2
3
+ /** Enables qw syntax for string.
4
+ *
5
+ * {{{
6
+ * import io.github.windymelt.qw.Syntax.*
7
+ * qw"foo bar buzz" // => "foo" :: "bar" :: "buzz" :: Nil
8
+ * }}}
9
+ *
10
+ * You can use newline for separator too:
11
+ *
12
+ * {{{
13
+ * qw"""
14
+ * new
15
+ * line
16
+ * separated
17
+ * """ // => "new" :: "line" :: "separated" :: Nil
18
+ * }}}
19
+ */
3
20
object Syntax :
4
21
extension (sc : StringContext )
22
+ /** Splits strings with whitespace character and constructs
23
+ * [[List[String ]]].
24
+ */
5
25
def qw (args : String * ): List [String ] =
6
26
val strings = sc.parts.iterator
7
27
val expressions = args.iterator
File renamed without changes.
You can’t perform that action at this time.
0 commit comments