Skip to content

Commit

Permalink
USER!!!!1!!!! YOU BROKE THE JS!!1!!!!!11!!!!!!1!11
Browse files Browse the repository at this point in the history
Bro really made a helper method without checking that the JS called it
  • Loading branch information
lyxal committed May 30, 2023
1 parent 85b7902 commit 9f6a76e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/src/main/scala/JSVyxal.scala
Expand Up @@ -55,7 +55,8 @@ object JSVyxal:

/** Bridge to turn literate code into SBCS */
@JSExport
def getSBCSified(code: String): String = LiterateLexer.processLit(code)
def getSBCSified(code: String): String =
LiterateLexer.processLitOptionless(code)

@JSExport
def getCodepage(): String = vyxal.CODEPAGE
Expand Down
3 changes: 3 additions & 0 deletions shared/src/main/scala/LiterateLexer.scala
Expand Up @@ -176,6 +176,9 @@ object LiterateLexer:
def processLit(code: String): Either[VyxalCompilationError, String] =
LiterateLexer(code).map(sbcsify)

def processLitOptionless(code: String): String =
sbcsify(LiterateLexer(code).getOrElse(Nil))

private def sbcsify(tokens: List[LiterateToken]): String =
val out = StringBuilder()

Expand Down

0 comments on commit 9f6a76e

Please sign in to comment.