Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
macaronideath
fc-pregmod
Commits
7c035304
Commit
7c035304
authored
4 years ago
by
lowercasedonkey
Browse files
Options
Downloads
Patches
Plain Diff
more py
parent
e29b3e20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devTools/Script to convert SC to JS/SC to JS 1.py
+15
-3
15 additions, 3 deletions
devTools/Script to convert SC to JS/SC to JS 1.py
with
15 additions
and
3 deletions
devTools/Script to convert SC to JS/SC to JS 1.py
+
15
−
3
View file @
7c035304
...
...
@@ -25,6 +25,7 @@ editor.rereplace(r"<<if (.*?)>>", r"if \1 {")
editor
.
rereplace
(
r
"
<<elseif (.*?)>>
"
,
r
"
} else if \(\1\) {
"
)
editor
.
rereplace
(
r
"
<<else>>
"
,
r
"
} else {
"
)
editor
.
rereplace
(
r
"
<</if>>
"
,
r
"
}
"
)
#fix paren
editor
.
rereplace
(
r
"
([ \n])if ([^\(].*) {
"
,
r
"
\1if \(\2\) {
"
)
editor
.
rereplace
(
r
"
([ \n])else if ([^\(].*) {
"
,
r
"
\1 else if \(\2\) {
"
)
...
...
@@ -32,7 +33,10 @@ editor.rereplace(r"([ \n])else if ([^\(].*) {", r"\1 else if \(\2\) {")
# run can happen directly
editor
.
rereplace
(
r
"
<<run (.*?)>>
"
,
r
"
\1;
"
)
# Set: otherwise we are likely modifying the value
# Clean up unset
editor
.
rereplace
(
r
"
<<unset (.*)>>
"
,
r
"
delete \1;
"
)
# Set
editor
.
rereplace
(
r
"
<<set (.*?)>>
"
,
r
"
$1;
"
)
#Switch
...
...
@@ -52,6 +56,7 @@ editor.rereplace(r"%/", r"*/")
# JS
editor
.
rereplace
(
r
"
==
"
,
r
"
===
"
)
editor
.
rereplace
(
r
"
!=
"
,
r
"
!==
"
)
editor
.
rereplace
(
r
"
_S\.
"
,
r
"
S.
"
)
#fix pronouns
editor
.
rereplace
(
r
"
V\.Hers
"
,
r
"
\${Hers}
"
)
...
...
@@ -91,6 +96,13 @@ editor.rereplace(r"_woman2", r"\${_woman2}")
editor
.
rereplace
(
r
"
_Hers2
"
,
r
"
\${_Hers2}
"
)
editor
.
rereplace
(
r
"
_hers2
"
,
r
"
\${_hers2}
"
)
#Headgirl gets fucked up in particular
editor
.
rereplace
(
r
"
\${He}adGirl
"
,
r
"
V.HeadGirl
"
)
editor
.
rereplace
(
r
"
\${slave}
"
,
r
"
slave
"
)
editor
.
rereplace
(
r
"
\${slave\.}
"
,
r
"
slave.
"
)
#look for variables embedded in literals
editor
.
rereplace
(
r
"
( r.push[^;$]*?)(V\.[^ ,<
'
`]*)
"
,
r
"
\1${\2}
"
)
editor
.
rereplace
(
r
"
( r.push[^;$]*?)(slave\.[^ ,<
'
`]*)
"
,
r
"
\1${\2}
"
)
\ No newline at end of file
editor
.
rereplace
(
r
"
( r.push[^;]*?)(V\.[^ ,<
'
`]*)
"
,
r
"
\1${\2}
"
)
editor
.
rereplace
(
r
"
( r.push[^;]*?)(slave\.[^ ,<
'
`]*)
"
,
r
"
\1${\2}
"
)
editor
.
rereplace
(
r
"
( r.push[^;]*?)(S\.[^ ,<
'
`]*)
"
,
r
"
\1${\2}
"
)
editor
.
rereplace
(
r
"
( r.push[^;]*?)( _[^ ,<
'
`]*)
"
,
r
"
\1${ \2}
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment