Basically very simple parser that lets you retrive value from text:
local Parser = require("./Parser")
local try,value = pcall(Parser,[[
{
Hello = "World";
Vector3.zero;
"Cool Syntax" = true;
}
]])
It is not only limited with tables!
local value = Parser("5+5")
Althrough math here doesnt follow abstract trees is is fully calculated from right side to left order wise BUT NOT OPERATION WISE.
Parser does accept character escaping aswell:
local value = Parser([["\tTab\nNewLine"]])
Also supports most datatypes like CFrame for example:
local value = Parser([[
CFrame.new(0,10,0)*CFrame.Angles(0,math.pi*0.25,0)
]])
I was making a plugin where user should input tables in a text format for them to be parsed hence why i made that parser.
Im planning to release something even cooler soon.
I have never in my life have written parser prior to that so it may be not the best implementation and honestly i regret using token system in general.
Plugin is written in --!strict mode so don’t worry about type errors.
https://create.roblox.com/store/asset/136331919522668
GitHub - YarikSuperpro/YSFFLUAU_TABLE-Parser
Fun fact:
YSFFLUAU_TABLE stands for Yarik’s Serialized Format for Luau table.