-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -995,6 +995,7 @@ specificLanguages=( | |
'TTCN-3 ' | ||
'TypeSpec ' | ||
'Typst ' | ||
'Up ' | ||
'Web Services ' | ||
'wenyan ' | ||
'Wren ' | ||
|