Skip to content

Commit

Permalink
UInt16 now Int16
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnlon committed Sep 9, 2022
1 parent ac45c81 commit 7443758
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jvmtools/compiler/src/main/scala/scc/StatementParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class StatementParser {
blockComment | lineComment |
//statementUInt8Eq |
statementConst |
statementUInt16EqExpr |
statementUInt16EqCondition |
statementInt16EqExpr |
statementInt16EqCondition |
statementVarLocatedDatasource |
statementVarDatasource |
// statementVarEqVarOpVar |
Expand Down Expand Up @@ -155,15 +155,15 @@ class StatementParser {
// }

// general purpose
def statementUInt16EqExpr: Parser[DefUint16EqExpr] = positioned {
def statementInt16EqExpr: Parser[DefUint16EqExpr] = positioned {
("uint16"|"short") ~> name ~ "=" ~ blkCompoundAluExpr <~ SEMICOLON ^^ {
case targetVar ~ _ ~ block =>
DefUint16EqExpr(targetVar, block)
}
}

// special purpose
def statementUInt16EqCondition: Parser[DefUint16EqCondition] = positioned {
def statementInt16EqCondition: Parser[DefUint16EqCondition] = positioned {
("short"|"uint16") ~> name ~ "=" ~ conditionWithExpr <~ SEMICOLON ^^ {
case targetVar ~ _ ~ condition =>
DefUint16EqCondition(targetVar, condition)
Expand Down Expand Up @@ -462,7 +462,7 @@ class StatementParser {
}
}

def program: Parser[Program] = "program" ~ "{" ~> ((statementUInt16EqExpr | statementVarDatasource | statementVarLocatedDatasource | lineComment | blockComment | functionDef) +) <~ "}" ^^ {
def program: Parser[Program] = "program" ~ "{" ~> ((statementInt16EqExpr | statementVarDatasource | statementVarLocatedDatasource | lineComment | blockComment | functionDef) +) <~ "}" ^^ {
fns => Program(fns)
}

Expand Down

0 comments on commit 7443758

Please sign in to comment.