Skip to content

Commit

Permalink
Add in support for up (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter authored Nov 10, 2024
1 parent c55ec6a commit 476406e
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 14 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ TypeScript Typings (d.ts)
TypeSpec (tsp)
Typst (typ)
Unreal Script (uc,uci,upkg)
Up (up)
Ur/Web (ur,urs)
Ur/Web Project (urp)
V (v)
Expand Down
26 changes: 13 additions & 13 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>447</th>
<th>7669</th>
<th>1413</th>
<th>255158</th>
<th>255238</th>
<th>4126</th>
</tr><tr>
<td>processor/workers_test.go</td>
Expand Down Expand Up @@ -130,16 +130,6 @@
<td>37</td>
<td>4585</td>
<td>97</td>
</tr><tr>
<td>cmd/badges/main_test.go</td>
<td></td>
<td>199</td>
<td>6</td>
<td>0</td>
<td>193</td>
<td>10</td>
<td>4088</td>
<td>106</td>
</tr><tr>
<td>processor/structs.go</td>
<td></td>
Expand All @@ -150,6 +140,16 @@
<td>17</td>
<td>5883</td>
<td>139</td>
</tr><tr>
<td>cmd/badges/main_test.go</td>
<td></td>
<td>199</td>
<td>6</td>
<td>0</td>
<td>193</td>
<td>10</td>
<td>4088</td>
<td>106</td>
</tr><tr>
<td>processor/workers_regression_test.go</td>
<td></td>
Expand Down Expand Up @@ -288,7 +288,7 @@
<td>1</td>
<td>4</td>
<td>0</td>
<td>22891</td>
<td>22971</td>
<td>6</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -299,7 +299,7 @@
<th>447</th>
<th>7669</th>
<th>1413</th>
<th>255158</th>
<th>255238</th>
<th>4126</th>
</tr>
<tr>
Expand Down
24 changes: 24 additions & 0 deletions examples/language/up.up
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// func => function definition keyword (reserved word)
// function_a => function name (user-defined)
// int1 => parameter name (user-defined)
// [variable_name]: int => parameter data type (int is a reserved word)
// [function] -> string => return data type (string is a reserved word)
// nilStr => variable name (user-defined)
// "nil" => variable value (user-defined)
func function_a(int1: int) -> string {
nilStr = "nil"
return nilStr + int1
}

// func => function definition keyword (reserved word)
// integer_mul => function name (user-defined)
// integer => parameter name (user-defined)
// [variable_name]: int => parameter data type (int is a reserved word)
// [function] -> int => return data type (int is a reserved word)
func integer_mul(integer: int) -> int {
return integer * 2
}

func main() -> nil {
print(function_a(3) + integer_mul())
}
29 changes: 29 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6613,6 +6613,35 @@
"multi_line": [],
"quotes": []
},
"Up": {
"complexitychecks": [
"for ",
"if ",
"switch ",
"while ",
"else ",
"try ",
"func ",
"up ",
"|| ",
"&& ",
"!= ",
"== "
],
"extensions": ["up"],
"line_comment": ["//"],
"multi_line": [],
"quotes": [
{
"end": "\"",
"start": "\""
},
{
"end": "`",
"start": "`"
}
]
},
"V": {
"complexitychecks": [
"for ",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ specificLanguages=(
'TTCN-3 '
'TypeSpec '
'Typst '
'Up '
'Web Services '
'wenyan '
'Wren '
Expand Down

0 comments on commit 476406e

Please sign in to comment.