2025-10-31 02:31:33 +02:00
|
|
|
import configparser
|
|
|
|
|
import argparse
|
|
|
|
|
import Fparser
|
2025-11-01 02:25:46 +02:00
|
|
|
import Fwritter
|
2025-10-31 02:31:33 +02:00
|
|
|
version = 1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(
|
|
|
|
|
|
|
|
|
|
prog="Pseudo (to) Pseudoglossa Compiler",
|
|
|
|
|
epilog="hi",
|
|
|
|
|
description="Compiles Pseudo code to psebdoglossa while adding stuff like: Rendering Functions | Math | Libraries | Srtings etc .. "
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
parser.add_argument("-d", "--devmode", action='store_true')
|
|
|
|
|
parser.add_argument("-f", "--file")
|
|
|
|
|
parser.add_argument("-p", "--project")
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("Pseudo to Pseudoglossa Compiler V" + str(version))
|
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
|
print("=============================================")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def checkDeps():
|
|
|
|
|
import Fparser
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def compileSingle(file):
|
2025-11-01 02:25:46 +02:00
|
|
|
fileBuffer = Fparser.readfile(file, True)
|
|
|
|
|
meshBuffer = Fparser.meshBuffer(fileBuffer, True)
|
|
|
|
|
Fwritter.grabScriptType(meshBuffer,True)
|
2025-10-31 02:31:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def runArgs():
|
|
|
|
|
print(str(args.file) , "|" , str(args.project))
|
|
|
|
|
if(str(args.file )!= "None"):
|
|
|
|
|
print(f"Single file Project -> {str(args.file)}")
|
|
|
|
|
compileSingle(str(args.file))
|
|
|
|
|
elif(str(args.project )!= "None"):
|
|
|
|
|
print(f"Using {str(args.project)} as Project folder")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkDeps()
|
|
|
|
|
runArgs()
|