Skip to content

Commit

Permalink
Update parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Nov 22, 2023
1 parent 77a1272 commit 53c5656
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
HEADER = "<roblox!"
RBXM_SIGNATURE = "\x89\xff\x0d\x0a\x1a\x0a"
ZSTD_HEADER = "\x28\xB5\x2F\xFD"
def createTable(length,val):
arr=[]
for i in range(length):
arr.append(val)
##end
return arr
##end
##class COMPILER:
def parse(file):
parsedString = ""
Expand All @@ -16,6 +23,17 @@ def parse(file):
if (rbxmBuffer.read(2)!="\0\0"):
errorHandler.error("Invalid RBXM version, if Roblox has released a newer version (unlikely), please let me know.")
##end
classCount=rbxmBuffer.readNumber("<i4")
instCount=rbxmBuffer.readNumber("<i4")
classRefIds=createTable(classCount)
instRefIds=createTable(instCount)
class rbxm:
ClassRefs=classRefIds
InstanceRefs=instRefIds
Tree=[]
Metadata=[]
Strings=[]
##end
##endwith
##end
def toJson(obj):
Expand Down

0 comments on commit 53c5656

Please sign in to comment.