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

Upd project dependencies #126

Merged
merged 4 commits into from Dec 6, 2021
Merged

Upd project dependencies #126

merged 4 commits into from Dec 6, 2021

Conversation

pomadchin
Copy link
Member

@pomadchin pomadchin commented Dec 5, 2021

This PR bumps all project deps up as well as slightly changes scalafmt config.

@pomadchin pomadchin requested a review from LMnet December 5, 2021 19:07
@pomadchin pomadchin requested a review from strobe December 5, 2021 19:10
@pomadchin pomadchin requested a review from dos65 December 5, 2021 19:14
project/Dependencies.scala Outdated Show resolved Hide resolved
Comment on lines +26 to +49
def key[T: P]: P[String] = P(CharIn("a-z") | CharIn("0-9") | "." | "_" | "-").rep.!
def value[T: P]: P[String] = P(CharsWhile(_ != '\n')).!

def pair[T: P]: P[(String, Option[String])] = P(key ~ "=" ~ value.? ~ "\n")
def head[T: P]: P[Seq[(String, Option[String])]] = P("\n".rep.? ~ pair.rep ~ "-".rep(2) ~ "\n")

def showNotes[T: P]: P[String] = P(AnyChar.rep).!

def format[T: P]: P[FileFormat] = P(head ~ showNotes).map { case (pairs, data) =>
FileFormat(
pairs
.map(x =>
(
x._1,
x._2 match {
case Some(v) => Some(v)
case None => Some("")
}
)
)
.toMap,
data
)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@dos65 dos65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@LMnet LMnet self-requested a review December 6, 2021 07:36
@pomadchin pomadchin merged commit 638e6d1 into master Dec 6, 2021
@pomadchin pomadchin deleted the upd/deps branch December 6, 2021 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants