-
Notifications
You must be signed in to change notification settings - Fork 12
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
1 parent
cd62a8a
commit 1ef84ba
Showing
16 changed files
with
240 additions
and
17 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
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
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,81 @@ | ||
globalVar := "Global" | ||
global SuperGlobalVar := "SuperGlobal" | ||
function() | ||
return | ||
function() | ||
{ | ||
globalVar := "Local" | ||
SuperGlobalVar := "Local" | ||
bool := true | ||
str := "string" | ||
if (str == "str") { | ||
MsgBox Overwrite primitive variable! | ||
} | ||
str_multiline := " | ||
(LTrim | ||
line 1 | ||
line 2 | ||
line 3 | ||
)" | ||
int := 123 | ||
float := 123.456 | ||
|
||
emptyArray := [] | ||
smallArray := [1, 2, { str: "string" }] | ||
sparseArray := { 1: 1, 3: 3 } | ||
arrayLike := { 1: 1, 2: 2, 3: 3, length: 3 } | ||
bigArray := [] | ||
Loop 150 { | ||
bigArray.push(A_Index) | ||
} | ||
if (bigArray == "str") { | ||
MsgBox Overwrite object variable! | ||
} | ||
|
||
obj := { str: str, int: int, float: float } | ||
objobj := { str: str, obj: obj } | ||
objobjobj := { str: str, int: int, obj: { str: str, obj: obj } } | ||
|
||
circular := {} | ||
circular.circular := circular | ||
instance := new Cls() | ||
|
||
enum := obj._NewEnum() | ||
} | ||
class Cls | ||
{ | ||
instanceVar := "instance" | ||
static str := "string" | ||
static num := 123 | ||
static obj := { str: "string", int: 123, float: 123.456 } | ||
property[] { | ||
get { | ||
} | ||
} | ||
method() { | ||
} | ||
} | ||
|
||
; Block comments and nested regions | ||
/* ;region | ||
Collapse me! | ||
{ | ||
Collapse me too! | ||
} | ||
*/ ;endregion | ||
|
||
; Function calls (with a space before parens) | ||
foo() | ||
bar () | ||
baz () ; multiple spaces | ||
|
||
; SUBROUTINES | ||
|
||
; ExitApp indentation for subroutines | ||
MySub: | ||
foo() | ||
ExitApp ; should not be indented at all | ||
|
||
; Formatting line below ternary with third operand a string value | ||
true ? 1 : "string" | ||
foo() ; should not be indented at all |
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,81 @@ | ||
globalVar := "Global" | ||
global SuperGlobalVar := "SuperGlobal" | ||
function() | ||
return | ||
function() | ||
{ | ||
globalVar := "Local" | ||
SuperGlobalVar := "Local" | ||
bool := true | ||
str := "string" | ||
if (str == "str") { | ||
MsgBox Overwrite primitive variable! | ||
} | ||
str_multiline := " | ||
(LTrim | ||
line 1 | ||
line 2 | ||
line 3 | ||
)" | ||
int := 123 | ||
float := 123.456 | ||
|
||
emptyArray := [] | ||
smallArray := [1, 2, { str: "string" }] | ||
sparseArray := { 1: 1, 3: 3 } | ||
arrayLike := { 1: 1, 2: 2, 3: 3, length: 3 } | ||
bigArray := [] | ||
Loop 150 { | ||
bigArray.push(A_Index) | ||
} | ||
if (bigArray == "str") { | ||
MsgBox Overwrite object variable! | ||
} | ||
|
||
obj := { str: str, int: int, float: float } | ||
objobj := { str: str, obj: obj } | ||
objobjobj := { str: str, int: int, obj: { str: str, obj: obj } } | ||
|
||
circular := {} | ||
circular.circular := circular | ||
instance := new Cls() | ||
|
||
enum := obj._NewEnum() | ||
} | ||
class Cls | ||
{ | ||
instanceVar := "instance" | ||
static str := "string" | ||
static num := 123 | ||
static obj := { str: "string", int: 123, float: 123.456 } | ||
property[] { | ||
get { | ||
} | ||
} | ||
method() { | ||
} | ||
} | ||
|
||
; Block comments and nested regions | ||
/* ;region | ||
Collapse me! | ||
{ | ||
Collapse me too! | ||
} | ||
*/ ;endregion | ||
|
||
; Function calls (with a space before parens) | ||
foo() | ||
bar () | ||
baz () ; multiple spaces | ||
|
||
; SUBROUTINES | ||
|
||
; ExitApp indentation for subroutines | ||
MySub: | ||
foo() | ||
ExitApp ; should not be indented at all | ||
|
||
; Formatting line below ternary with third operand a string value | ||
true ? 1 : "string" | ||
foo() ; should not be indented at all |
File renamed without changes.
File renamed without changes.
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,5 @@ | ||
x := " | ||
(LTrim | ||
hello world | ||
) | ||
" |
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,5 @@ | ||
x := " | ||
(LTrim | ||
hello world | ||
) | ||
" |
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,3 @@ | ||
foo() { | ||
x := 1 | ||
} |
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,3 @@ | ||
foo() { | ||
x := 1 | ||
} |
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