-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: Tokenizer update * Split ATL patterns into it's own file * Update typescript file generator * replace with auto-generated ATL patterns * Added sort function for vector * WIP: auto generate python and renpy patterns Something is still causing the tokenizer to misalign when using the generated patterns. I'll try to fix it tomorrow * Switch last token to be the important one This is to match the behaviour of textmate, where the top most token is the last token added * Added missing token cases * Update tokenizer to match textmate behaviour on range patterns This allows the end pattern of a range to extend based on the content pattern matches * Move to separate functions * WIP optimizations * Fix bugs * Code cleanup and fixes * Delete all token position update code * Update pattern generator Due to the way typescript initializes const object, we can't have circular references to patterns. To fix that, we just push all external dependencies in a shared file after all other files have been loaded. * Fix some bugs in the syntax patterns Remove use of \G as javascript's regex engine doesn't support it Other fixes to make sure we can tokenize the python grammar file Change some renpy keyword to display as control flow keywords * Ignore generated files * Delete this file as it is no longer used * Fix custom color style injection * Fixed merge error * Use dataclass annotation * Don't display unmatched tokens to the end user Will add a special rule in our development area for displaying these in red
- Loading branch information
Showing
23 changed files
with
8,448 additions
and
3,885 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 |
---|---|---|
|
@@ -3,4 +3,7 @@ | |
**/dist | ||
|
||
# Ignore all markdown files: | ||
*.md | ||
*.md | ||
|
||
# Ignore all generated typescript files: | ||
*.g.ts |
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 @@ | ||
init python hide early in Namespace: | ||
|
||
def sampleFunction(name, delay, position=(0,0)): | ||
""" | ||
This is a sample function. | ||
""" | ||
# test | ||
renpy.pause(delay) | ||
return name | ||
|
||
class Inventory: | ||
""" | ||
This is a fake inventory class. | ||
""" | ||
|
||
def __init__(self): | ||
self.items = [] | ||
|
||
def add(self, item): | ||
"""Add an item to the inventory.""" | ||
self.items.append(item); | ||
return | ||
|
||
|
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.