-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into features/powershell-control-structures
- Loading branch information
Showing
4 changed files
with
277 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Check Docker Build | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
name: Check Docker Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Docker Compose Build | ||
run: docker-compose build |
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,106 @@ | ||
{ | ||
"meta": { | ||
"language": "lua", | ||
"language_name": "Lua", | ||
"structure": "functions", | ||
"language_version": "5.1" | ||
}, | ||
"concepts": { | ||
"void_function_no_parameters": { | ||
"name": "Function that does not return a value and takes no parameters", | ||
"code": [ | ||
"function greet()\nend" | ||
] | ||
}, | ||
"void_function_with_parameters": { | ||
"name": "Function that does not return a value and that takes 1 or more defined parameters", | ||
"code": [ | ||
"function addNumbers(a, b)\nend" | ||
] | ||
}, | ||
"void_function_with_keyword_parameters": { | ||
"name": "Function that does not return a value and that takes 0 or more defined keyword parameters", | ||
"not-implemented": "true" | ||
}, | ||
"void_function_variable_parameters": { | ||
"name": "Function that does not return a value and function that takes an unknown number of parameters", | ||
"code": [ | ||
"function myFunction(...)\nend" | ||
] | ||
}, | ||
"return_value_function_no_parameters": { | ||
"name": "Function that returns a value and takes no parameters", | ||
"code": [ | ||
"function generateRandomNumber()\nreturn true\nend" | ||
] | ||
}, | ||
"return_value_function_with_parameters": { | ||
"name": "Function that returns a value and takes 1 or more defined parameters", | ||
"code": [ | ||
"function addNumbers(a, b)\nreturn a,b\nend" | ||
] | ||
}, | ||
"return_value_function_with_keyword_parameters": { | ||
"name": "Function that returns a value and takes 0 or more defined keyword parameters", | ||
"not-implemented": "true" | ||
}, | ||
"return_value_function_variable_parameters": { | ||
"name": "Function that returns a value and takes an unknown number of parameters", | ||
"code": [ | ||
"function sum(...)\nreturn...\nend" | ||
] | ||
}, | ||
"anonymous_function_no_parameters": { | ||
"name": "Anonymous function that takes no parameters", | ||
"code": [ | ||
"local myFunction = function()\nend" | ||
] | ||
}, | ||
"anonymous_function_with_parameters": { | ||
"name": "Anonymous function that takes 1 or more defined parameters", | ||
"code": [ | ||
"local add = function(a, b)\nend" | ||
] | ||
}, | ||
"anonymous_function_with_keyword_parameters": { | ||
"name": "Anonymous function that takes 0 or more defined keyword parameters", | ||
"not-implemented": "true" | ||
}, | ||
"anonymous_function_variable_parameters": { | ||
"name": "Anonymous function that takes an unknown number of parameters", | ||
"code": [ | ||
"local add = function(...)\nend" | ||
] | ||
}, | ||
"anonymous_function_no_parameters_with_return": { | ||
"name": "Anonymous function that takes no parameters and returns a value", | ||
"code": [ | ||
"local myFunction = function()\nreturn true\nend" | ||
] | ||
}, | ||
"anonymous_function_with_parameters_with_return": { | ||
"name": "Anonymous function that takes 1 or more defined parameters and returns a value", | ||
"code": [ | ||
"local add = function(a, b)\nreturn a,b\nend" | ||
] | ||
}, | ||
"anonymous_function_with_keyword_parameters_with_return": { | ||
"name": "Anonymous function that takes 0 or more defined keyword parameters and returns a value", | ||
"not-implemented": "true" | ||
}, | ||
"anonymous_function_variable_parameters_with_return": { | ||
"name": "Anonymous function that takes an unknown number of parameters and returns a value", | ||
"code": [ | ||
"local myFunction = function(...)\nreturn...\nend" | ||
] | ||
}, | ||
"call_subroutine": { | ||
"name": "Call subroutine", | ||
"not-implemented": "true" | ||
}, | ||
"return_from_subroutine": { | ||
"name": "Return from subroutine", | ||
"not-implemented": "true" | ||
} | ||
} | ||
} |
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,157 @@ | ||
{ | ||
"meta": { | ||
"language": "powershell", | ||
"language_name": "Powershell", | ||
"structure": "classes", | ||
"language_version": "7" | ||
}, | ||
"concepts": { | ||
"normal_class": { | ||
"name": "Normal class", | ||
"code": [ | ||
"class ClassName {", | ||
" # class body", | ||
"}" | ||
] | ||
}, | ||
"abstract_class": { | ||
"name": "Abstract class", | ||
"not-implemented": true | ||
}, | ||
"interface": { | ||
"name": "Interface", | ||
"not-implemented": true | ||
}, | ||
"read_only_class": { | ||
"name": "Read-only class", | ||
"not-implemented": true | ||
}, | ||
"static_class": { | ||
"name": "Static class", | ||
"not-implemented": true | ||
}, | ||
"inner_class": { | ||
"name": "Inner class", | ||
"not-implemented": true | ||
}, | ||
"packages": { | ||
"name": "Packages", | ||
"code": [ | ||
"using namespace Your.Package" | ||
] | ||
}, | ||
"class_with_generic_type": { | ||
"name": "Class with a generic type", | ||
"not-implemented": true | ||
}, | ||
"private_variables": { | ||
"name": "Defining private variables", | ||
"code": [ | ||
"class ClassName {", | ||
" hidden [string] $privateVariable = \"private\";", | ||
"}" | ||
], | ||
"comment": "It's not possible to define private variables in Powershell. The closest approximation is to define a hidden variable." | ||
}, | ||
"protected_variables": { | ||
"name": "Defining protected variables", | ||
"not-implemented": true | ||
}, | ||
"public_variables": { | ||
"name": "Defining public variables", | ||
"code": [ | ||
"class ClassName {", | ||
" [string] $publicVariable = \"public\";", | ||
"}" | ||
] | ||
}, | ||
"static_variables": { | ||
"name": "Defining static variables", | ||
"code": [ | ||
"class ClassName {", | ||
" static [string] $staticVariable = \"static\";", | ||
"}" | ||
] | ||
}, | ||
"private_functions": { | ||
"name": "Defining private functions", | ||
"code": [ | ||
"class ClassName {", | ||
" hidden [string] privateFunction() {", | ||
" return \"private\";", | ||
" }", | ||
"}" | ||
], | ||
"comment": "It's not possible to define private functions in Powershell. The closest approximation is to define a hidden function." | ||
}, | ||
"protected_functions": { | ||
"name": "Defining protected functions", | ||
"not-implemented": true | ||
}, | ||
"public_functions": { | ||
"name": "Defining public functions", | ||
"code": [ | ||
"class ClassName {", | ||
" [string] publicFunction() {", | ||
" return \"public\";", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"static_functions": { | ||
"name": "Defining static functions", | ||
"code": [ | ||
"class ClassName {", | ||
" static [string] staticFunction() {", | ||
" return \"static\";", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"extends_class": { | ||
"name": "Class that inherits/extends another class", | ||
"code": [ | ||
"class ClassName : BaseClass {", | ||
" # class body", | ||
"}" | ||
] | ||
}, | ||
"extending_interface": { | ||
"name": "Class/Interface that inherits/extends another class/interface", | ||
"not-implemented": true | ||
}, | ||
"calling_superclass_functions": { | ||
"name": "Calling a superclass function", | ||
"not-implemented": true | ||
}, | ||
"overriding_superclass_functions": { | ||
"name": "Overriding a superclass function", | ||
"not-implemented": true | ||
}, | ||
"instantiating_object": { | ||
"name": "Instantiating a new object", | ||
"code": [ | ||
"$object = [ClassName]::new()", | ||
"$object = New-Object ClassName" | ||
] | ||
}, | ||
"instantiating_polymorphic_object": { | ||
"name": "Instantiating a polymorphic object", | ||
"not-implemented": true | ||
}, | ||
"implement_constructor": { | ||
"name": "Implementing a class constructor", | ||
"code": [ | ||
"class ClassName {", | ||
" ClassName() {", | ||
" # constructor body", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"implement_deconstructor": { | ||
"name": "Implementing a class deconstructor", | ||
"not-implemented": true | ||
} | ||
} | ||
} |