-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from StartAutomating/Irregular-Updates
Irregular 0.7.7
- Loading branch information
Showing
19 changed files
with
149 additions
and
19 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 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,17 @@ | ||
$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path -Leaf) -replace '\.source', '' -replace '\.ps1', '.txt' | ||
$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path | ||
|
||
New-RegEx -Description "Matches ANSI Hyperlink" | | ||
New-RegEx -CharacterClass Escape -Comment 'An Escape' | | ||
New-RegEx -LiteralCharacter ']' -Comment 'Followed by a right bracket' | | ||
New-RegEx -Pattern '8[^;]{0,};;' -Comment 'Followed by 8 (and optional non-semicolon content) and two semicolons' | | ||
New-RegEx -Until '\e' -Name Uri -Comment 'Followed by the uri' | | ||
New-RegEx -CharacterClass Escape -Comment 'Followed by an escape' | | ||
New-RegEx -LiteralCharacter '\' -Comment 'Followed by a slash' | | ||
New-RegEx -Until '\e' -Name Text -Comment 'Followed by the link text' | | ||
New-RegEx -CharacterClass Escape -Comment 'Followed by an escape' | | ||
New-RegEx -LiteralCharacter ']' -Comment 'Followed by a right bracket' | | ||
New-RegEx -Pattern '8[^;]{0,};;' -Comment 'Followed by 8 (and optional non-semicolon content) and two semicolons' | | ||
New-RegEx -CharacterClass Escape -Comment 'Followed by an Escape' | | ||
New-RegEx -LiteralCharacter '\' -Comment 'Finally a closing slash' | | ||
Set-Content -Path (Join-Path $myRoot $myName) |
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,14 @@ | ||
# Matches ANSI Hyperlink | ||
\e # An Escape | ||
\] # Followed by a right bracket | ||
8[^;]{0,};; # Followed by 8 and two semicolons | ||
(?<Uri>(?:.|\s){0,}?(?=\z|\e)) # Followed by the uri | ||
\e # Followed by an escape | ||
\\ # Followed by a slash | ||
(?<Text>(?:.|\s){0,}?(?=\z|\e)) # Followed by the link text | ||
\e # Followed by an escape | ||
\] # Followed by a right bracket | ||
8[^;]{0,};; # Followed by 8 and two semicolons | ||
\e # Followed by an Escape | ||
\\ # Finally a closing slash | ||
|
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,10 @@ | ||
$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path -Leaf) -replace '\.source', '' -replace '\.ps1', '.txt' | ||
$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path | ||
|
||
New-RegEx -Description "Matches methods in most languages" | | ||
New-RegEx -After ( | ||
New-RegEx -CharacterClass Punctuation, Whitespace, Tab | ||
) -Comment "Methods start after punctuation or whitespace" | | ||
New-RegEx -CharacterClass Word -LiteralCharacter _ -Repeat -Name MethodName -Comment "Method names can be any word character or undererscore" | | ||
New-RegEx -Description "A Generic Balancing Expression" -Name MethodParameters -Pattern '?<GenericBalancingExpression>' | | ||
Set-Content -Path (Join-Path $myRoot $myName) |
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,14 @@ | ||
# Matches methods in most languages | ||
(?<=[\p{P}\s\t]) # Methods start after punctuation or whitespace | ||
(?<MethodName>[\w_]+) # Method names can be any word character or undererscore | ||
# A Generic Balancing Expression | ||
(?<MethodParameters>(?<GenericBalancingExpression> | ||
\p{Ps} # The open punctuation | ||
(?> | ||
[^\p{Ps}\p{Pe}]+| # Anything that is neither open or closed punctuation | ||
\p{Ps}(?<Depth>)| # If it's open punctuation, increment depth | ||
\p{Pe}(?<-Depth>) # If it's closed punctuation, decrement depth | ||
)*(?(Depth)(?!)) # Match until depth is empty | ||
\p{Pe} # The closing punctuation | ||
) | ||
) |
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,33 @@ | ||
# Matches a Package Name with a Version. | ||
# Includes captures for Name, Version, Major, Minor, Patch, Build, and Prerelease, and Extension | ||
^ # Match the start | ||
(?<Name> # The (?<Name>) is... | ||
.+?(?=\z|[\.\-\@]\d+) # ...anything until a . followed by a digit (or end of string) | ||
) | ||
[\.\@] # Now we match a dot, at, or dash | ||
(?<Version> # The (?<Version>) is... | ||
(?<Major>\d+)[\.\-] # A (?<Major>) version digit, followed by a dot | ||
(?<Minor>\d+(?:[\.\-])?)? # [Optional] a (?<Minor>) version digit, followed by a dot | ||
(?<Patch>\d+(?:[\.\-])?)? # [Optional], a (?<Patch>) version digit, followed by a dot | ||
(?<Build>\d+(?:[\.\-])?)? # [Optional], a (?<Build>) version digit, followed by a dot | ||
(?(Build) # [Optional], If a (?<Build>) was found | ||
(?:(?=)) # capture nothing and move on | ||
| # Else | ||
\+(?<Build>[\w-]+) # Match a + followed by a build identifier | ||
)? | ||
(?: # [Optional] | ||
- # match a - | ||
(?<Prerelease>[\w-]+) # followed by a (?<Prerelease>) identifier | ||
)? | ||
(?(Build) # [Optional], If a (?<Build>) was found | ||
(?:(?=)) # capture nothing and move on | ||
| # otherwise | ||
\+(?<Build>[\w-]+) # Match a + followed by a build identifier | ||
)? | ||
) | ||
(?: # [Optional] | ||
\. # Match a final . | ||
(?<Extension> # The (?<Extension>) is | ||
.+?$ # anything until the end of the string | ||
) | ||
)? |
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
This directory contains regular expressions that may be helpful in parsing language agonstic coding conventions. | ||
|
||
|
||
|Name |Description |Source | | ||
|----------------------------------------------------|---------------------------------------------------------------------------------------|-----------------------------| | ||
|[?<Code_BuildVersion>](BuildVersion.regex.txt) |Matches a build version | | ||
|[?<Code_Namespace>](Namespace.regex.txt) |Finds a Namespace (captures the Name and the Content between {}) | | ||
|[?<Code_Region>](Region.regex.ps1) |Matches a #region #endregion pair. Returns the Name of the Region and the Content.<br/>|[generator](Region.regex.ps1)| | ||
|[?<Code_SemanticVersion>](SemanticVersion.regex.txt)|Matches a Semantic Version. See [https://semver.org/](https://semver.org/). | | ||
|Name |Description |Source | | ||
|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|---------------------------------| | ||
|[?<Code_BuildVersion>](BuildVersion.regex.txt) |Matches a build version | | ||
|[?<Code_Method>](Method.regex.txt) |Matches methods in most languages |[source](Method.regex.source.ps1)| | ||
|[?<Code_Namespace>](Namespace.regex.txt) |Finds a Namespace (captures the Name and the Content between {}) | | ||
|[?<Code_PackageVersion>](PackageVersion.regex.txt) |Matches a Package Name with a Version.<br/>Includes captures for Name, Version, Major, Minor, Patch, Build, and Prerelease, and Extension| | ||
|[?<Code_Region>](Region.regex.ps1) |Matches a #region #endregion pair. Returns the Name of the Region and the Content.<br/> |[generator](Region.regex.ps1) | | ||
|[?<Code_SemanticVersion>](SemanticVersion.regex.txt)|Matches a Semantic Version. See [https://semver.org/](https://semver.org/). | | ||
|
||
|
||
|
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 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
Oops, something went wrong.