[
  {
    "path": ".github/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at nguyenphuminh09876543@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "Contributing to FreakC!\n======================\n\nThanks for your interests in FreakC, if you want to contribute to the project, please consider looking at the following notes!\n\n## Language\nWe would prefer English as the main language for contributing, but you can use Vietnamese! \n\n## Writing a Good Pull Request\n\n- Make sure to write a rich description showing changes that you made, the upgrades on the project, what it would do, etc.\n\n- Name your pull request nicely.\n\n- Don't use any NSFW or weird contents in a pull request.\n\n\nThat's all, thanks for your time with FreakC!\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\nBEP-20: 0x1848Ba922d6eD66D4910176998fF4fa77AEb82D5\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. iOS]\n - Browser [e.g. chrome, safari]\n - Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Browser [e.g. stock browser, safari]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "**Please describe the changes this PR makes and why it should be merged:**\n\n**Classification**\n\nChoose one:\n\n- [ ] This PR add changes to the codebase.\n- [ ] This PR add changes to the documentations.\n"
  },
  {
    "path": "Examples/99BottlesOfBeer.fclang",
    "content": "change_title[] 99 Bottles Of Beer\r\n\r\nvar[] count=99\r\nwhile[] %count% GTR 0\r\n\tif[] %count% LEQ 1 (\r\n\t\tvar[] word=bottle\r\n\t) el[] (\r\n\t\tvar[] word=bottles\r\n\t)\r\n\tprint[] %count% %word% of beer on the wall\r\n\tprint[] %count% %word% of beer,\r\n\tprint[] Take one down, pass it around,\r\n\teq[] count--\r\n\tif[] %count% LEQ 1 (\r\n\t\tvar[] word=bottle\r\n\t) el[] (\r\n\t\tvar[] word=bottles\r\n\t)\r\n\tif[] %count% GTR 0 (\r\n\t\tprint[] %count% %word% of beer on the wall.\r\n\t) el[] (\r\n\t\tprint[] No more %word% of beer on the wall.\r\n\t)\r\nendwhile[]\r\nstop[] >nul"
  },
  {
    "path": "Examples/Calculator.fclang",
    "content": "change_title[] Calculator Made With FreakC\r\nchange_color[] 8f\r\nchange_mode[] con cols=60 lines=20\r\n\r\nlabel[] menu\r\nclrscr[]\r\n\r\nprint[]   ========================================================\r\nprint[]                       FreakC Calculator \r\nprint[]  \r\nprint[]                           \"+\" Plus\r\nprint[]  \r\nprint[]                          \"-\" Minus\r\nprint[]  \r\nprint[]                         \"*\" Multiply\r\nprint[]  \r\nprint[]                          \"/\" Divide\r\nprint[]  \r\nprint[]  \r\nprint[]       Enter your Math problem:\r\n\r\ninp[] prob=\r\n:: If you want to get the number fixed, you can replace the line below with PoopInt[fnc] ans=%prob%\r\nscan_strs[] %%i in (' ps[] %prob% ') do var[] ans=%%i\r\n\r\nprint[] Answer: %ans%\r\n\r\nstop[]\r\n\r\ngoto[] menu"
  },
  {
    "path": "Examples/Fibonacci.fclang",
    "content": "function[] func\r\n\tvar[] n1=0\r\n\tvar[] n2=1\r\n\tvar[] n3=0\r\n\tvar[] i=0\r\n\teq[] end=%~2 - 1\r\n\twhile[] %i% LSS %end%\r\n\t\teq[] n3=%n1%+%n2%\r\n\t\tvar[] n1=%n2%\r\n\t\tvar[] n2=%n3%\r\n\t\teq[] i++\r\n\tendwhile[]\r\n\tvar[] %~1=%n3%\r\nendfunc[]\r\n\r\nfunc[..] \"res\" \"5\"\r\nprint[] %res%\r\nstop[]"
  },
  {
    "path": "Examples/FizzBuzz.fclang",
    "content": "change_title[] FizzBuzz\r\n\r\neq[] count=1\r\nwhile[] %count% LSS 101\r\n\teq[] fizzbuzz=%count% %% 15\r\n\teq[] fizz=%count% %% 3\r\n\teq[] buzz=%count% %% 5\r\n\r\n\tif[] %fizzbuzz% == 0 (\r\n\t\tprint[] FizzBuzz\r\n\t) elif[] %fizz% == 0 (\r\n\t\tprint[] Fizz\r\n\t) elif[] %buzz% == 0 (\r\n\t\tprint[] Buzz\r\n\t) el[] (\r\n\t\tprint[] %count%\r\n\t)\r\n\teq[] count++\r\nendwhile[]\r\nstop[] >nul\r\n"
  },
  {
    "path": "Examples/HelloWorld.fclang",
    "content": "print[] Hello, World^!\r\nstop[] >nul"
  },
  {
    "path": "Examples/IsDivisable.fclang",
    "content": "change_title[] Is Divisable Checker\r\nchange_color[] 0a\r\n\r\nlabel[] menu\r\nclrscr[]\r\n\r\nprint[] Dividend:\r\ninp[] Dividend=\r\n\r\nprint[] \r\n\r\nprint[] Divisor:\r\ninp[] Divisor=\r\n\r\neq[] Remainder=%Dividend% %% %Divisor%\r\n\r\nprint[] \r\nprint[] \r\nprint[] \r\n\r\nif[] %Remainder% == 0 (\r\n\tprint[] It is divisable!\r\n) el[] (\r\n\tprint[] It is not divisable!\r\n)\r\n\r\nstop[] >nul\r\n\r\ngoto[] menu"
  },
  {
    "path": "Examples/LoveTester.fclang",
    "content": "change_title[] Love Tester\r\nchange_color[] 0a\r\n\r\nlabel[] game\r\nclrscr[]\r\n\r\nprint[] Person 1:\r\ninp[] person1=\r\n\r\nprint[] Person 2:\r\ninp[] person2=\r\n\r\ngoto[] test\r\n\r\nlabel[] test\r\n\r\neq[] test=%random% %% 100 + 0\r\nprint[] %test% percents of love\r\n\r\nstop[]\r\n\r\ngoto[] game"
  },
  {
    "path": "Examples/OOP.fclang",
    "content": "function[] Dog\r\n    var[] %~1.age=%~2\r\n    var[] %~1.weight=%~3\r\n    print[] print[] %%~1>%~1.says.bat\r\nendfunc[]\r\n\r\nDog[..] \"Mary\" \"3\" \"4kg\"\r\nprint[] Age: %Mary.age%\r\nprint[] Weight: %Mary.weight%\r\nMary.says[..] \"Woof woof\"\r\n"
  },
  {
    "path": "Examples/OddOrEven.fclang",
    "content": "change_title[] Odd or Even checker\r\n\r\nclrscr[]\r\n\r\ninp[] inp=\r\n\r\neq[] ans=%inp% %% 2\r\n\r\nif[] %ans% == 0 (\r\n\tprint[] Is even\r\n) el[] (\r\n\tprint[] Is odd\r\n)\r\n\r\nstop[]\r\n\r\ninf_loop[]"
  },
  {
    "path": "Examples/RPG.fclang",
    "content": "change_title[] RPG DEMO\r\nchange_color[] 2f\r\nchange_mode[] con cols=70 lines=20\r\n\r\neq[] ehp=100\r\neq[] hp=100\r\n\r\nlabel[] Battle\r\nclrscr[]\r\n\r\nif[] %ehp% LEQ 0 goto[] win\r\nif[] %hp% LEQ 0 goto[] lose\r\n\r\nprint[] \r\nprint[] \r\nprint[] \r\nprint[]                             Goblin: %ehp% HP\r\nprint[]                             You: %hp% HP\r\nprint[] \r\nprint[] \r\nprint[] \r\nprint[] \r\nprint[]                               Moves:\r\nprint[] \r\nprint[]                  1. Punch               2. Flee\r\nprint[] \r\n\r\nkey[] 12\r\n\r\nif_el[] 2 goto[] Flee\r\nif_el[] 1 goto[] Punch\r\n\r\nlabel[] Punch\r\neq[] ehp-=20\r\neq[] hp-=10\r\ngoto[] Battle\r\n\r\nlabel[] Flee\r\nclrscr[]\r\nprint[]                         You fleed from battle!\r\nstop[] >nul\r\nquit[]\r\n\r\nlabel[] win\r\nprint[]                                You win!\r\nstop[] >nul\r\nquit[]\r\n\r\nlabel[] lose\r\nprint[]                    By somehow you lose, but okay...\r\nstop[] >nul\r\nquit[]"
  },
  {
    "path": "Examples/RainbowText.fclang",
    "content": "change_title[] Rainbow Text\r\n\r\nlabel[] rainbowtext\r\n\r\nchange_color[] 0a\r\nprint[] Hello, World^!\r\n\r\nchange_color[] 0b\r\nprint[] Hello, World^!\r\n\r\nchange_color[] 0c\r\nprint[] Hello, World^!\r\n\r\nchange_color[] 0d\r\nprint[] Hello, World^!\r\n\r\nchange_color[] 0e\r\nprint[] Hello, World^!\r\n\r\nchange_color[] 0f\r\nprint[] Hello, World^!\r\n\r\ngoto[] rainbowtext"
  },
  {
    "path": "Examples/SortArray.fclang",
    "content": "inp[] n=The amount of element:\r\nloop[] %%i in (1,1,%n%) do inp[] arr[%%i]=Element %%i:\r\n\r\nenb_delay[]\r\nloop[] %%i in (1,1,%n%) do (\r\n\teq[] ind=%%i+1\r\n\tloop[] %%j in (^!ind^!,1,%n%) do (\r\n\t\tif[] ^!arr[%%i]^! GTR ^!arr[%%j]^! (\r\n\t\t\tvar[] temp=^!arr[%%i]^!\r\n\t\t\tvar[] arr[%%i]=^!arr[%%j]^!\r\n\t\t\tvar[] arr[%%j]=^!temp^!\r\n\t\t)\r\n\t)\r\n)\r\n\r\nprint[] Sorted:\r\nloop[] %%i IN (1,1,%n%) DO print[] Element %%i: ^!arr[%%i]^!\r\n"
  },
  {
    "path": "Examples/StoreData.fclang",
    "content": "print[] Example>>data.txt"
  },
  {
    "path": "Examples/TheTruthMachine.fclang",
    "content": "change_title[] The truth machine\r\n\r\ninp[] inp=\r\n\r\nif[] %inp% == 0 (\r\n\tprint[] 0\r\n) el[] if[] %inp% == 1 (\r\n\tlabel[] loop\r\n\tprint[] %inp%\r\n\tgoto[] loop\r\n)\r\n\r\ninf_loop[]"
  },
  {
    "path": "Examples/Tictactoe.fclang",
    "content": "change_title[] TicTacToe\r\nchange_color[] e4\r\nchange_mode[] con cols=70 lines=20\r\n\r\nlabel[] tictactoe\r\nclrscr[]\r\nvar[] a1=1\r\nvar[] a2=2\r\nvar[] a3=3\r\nvar[] a4=4\r\nvar[] a5=5\r\nvar[] a6=6\r\nvar[] a7=7\r\nvar[] a8=8\r\nvar[] a9=9\r\nvar[] s1=A\r\nvar[] s2=A\r\nvar[] s3=A\r\nvar[] s4=A\r\nvar[] s5=A\r\nvar[] s6=A\r\nvar[] s7=A\r\nvar[] s8=A\r\nvar[] s9=A\r\nvar[] attack=0\r\nvar[] cycle=0\r\nvar[] moves=0\r\nlabel[] Start\r\nclrscr[]\r\nprint[]                                *******\r\nprint[]                                *%a1% %a2% %a3%*\r\nprint[]                                *%a4% %a5% %a6%*\r\nprint[]                                *%a7% %a8% %a9%*\r\nprint[]                                *******\r\nprint[]                            Enter a number:\r\nkey[] 123456789\r\nif_el[] 9 goto[] d9\r\nif_el[] 8 goto[] d8\r\nif_el[] 7 goto[] d7\r\nif_el[] 6 goto[] d6\r\nif_el[] 5 goto[] d5\r\nif_el[] 4 goto[] d4\r\nif_el[] 3 goto[] d3\r\nif_el[] 2 goto[] d2\r\nif_el[] 1 goto[] d1\r\ngoto[] Start\r\nlabel[] d1\r\nif[] %s1% EQU N goto[] Start\r\nvar[] a1=X\r\nvar[] s1=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d2\r\nif[] %s2% EQU N goto[] Start\r\nvar[] a2=X\r\nvar[] s2=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d3\r\nif[] %s3% EQU N goto[] Start\r\nvar[] a3=X\r\nvar[] s3=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d4\r\nif[] %s4% EQU N goto[] Start\r\nvar[] a4=X\r\nvar[] s4=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d5\r\nif[] %s5% EQU N goto[] Start\r\nvar[] a5=X\r\nvar[] s5=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d6\r\nif[] %s6% EQU N goto[] Start\r\nvar[] a6=X\r\nvar[] s6=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d7\r\nif[] %s7% EQU N goto[] Start\r\nvar[] a7=X\r\nvar[] s7=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d8\r\nif[] %s8% EQU N goto[] Start\r\nvar[] a8=X\r\nvar[] s8=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] d9\r\nif[] %s9% EQU N goto[] Start\r\nvar[] a9=X\r\nvar[] s9=N\r\neq[] moves=%moves%+1\r\ngoto[] check\r\nlabel[] check\r\nif[] %a1%+%a2%+%a3% EQU X+X+X goto[] win\r\nif[] %a4%+%a5%+%a6% EQU X+X+X goto[] win\r\nif[] %a7%+%a8%+%a9% EQU X+X+X goto[] win\r\nif[] %a1%+%a4%+%a7% EQU X+X+X goto[] win\r\nif[] %a2%+%a5%+%a8% EQU X+X+X goto[] win\r\nif[] %a3%+%a6%+%a9% EQU X+X+X goto[] win\r\nif[] %a1%+%a5%+%a9% EQU X+X+X goto[] win\r\nif[] %a3%+%a5%+%a7% EQU X+X+X goto[] win\r\nif[] %moves% EQU 9 goto[] draw\r\ngoto[] middle\r\nlabel[] middle\r\nif[] %s5% EQU N goto[] mon\r\nvar[] a5=O\r\nvar[] s5=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] mon\r\nif[] %moves% GEQ 1 goto[] Offence\r\nif[] %moves% EQU 9 goto[] draw\r\nlabel[] Offence\r\nif[] %a1%+%a2%+%a3% EQU O+O+3 goto[] a3set\r\nif[] %a1%+%a2%+%a3% EQU 1+O+O goto[] a1set\r\nif[] %a1%+%a2%+%a3% EQU O+2+O goto[] a2set\r\nif[] %a4%+%a5%+%a6% EQU O+O+6 goto[] a6set\r\nif[] %a4%+%a5%+%a6% EQU O+5+O goto[] a5set\r\nif[] %a4%+%a5%+%a6% EQU 4+O+O goto[] a4set\r\nif[] %a7%+%a8%+%a9% EQU O+O+9 goto[] a9set\r\nif[] %a7%+%a8%+%a9% EQU 7+O+O goto[] a7set\r\nif[] %a7%+%a8%+%a9% EQU O+8+O goto[] a8set\r\nif[] %a1%+%a4%+%a7% EQU 1+O+O goto[] a1set\r\nif[] %a1%+%a4%+%a7% EQU O+4+O goto[] a4set\r\nif[] %a1%+%a4%+%a7% EQU O+O+7 goto[] a7set\r\nif[] %a2%+%a5%+%a8% EQU 2+O+O goto[] a2set\r\nif[] %a2%+%a5%+%a8% EQU O+5+O goto[] a5set\r\nif[] %a2%+%a5%+%a8% EQU O+O+8 goto[] a8set\r\nif[] %a3%+%a6%+%a9% EQU O+O+9 goto[] a9set\r\nif[] %a3%+%a6%+%a9% EQU 3+O+O goto[] a3set\r\nif[] %a3%+%a6%+%a9% EQU O+6+O goto[] a6set\r\nif[] %a1%+%a5%+%a9% EQU O+5+O goto[] a5set\r\nif[] %a1%+%a5%+%a9% EQU O+O+9 goto[] a9set\r\nif[] %a1%+%a5%+%a9% EQU 1+O+O goto[] a1set\r\nif[] %a3%+%a5%+%a7% EQU O+O+7 goto[] a7set\r\nif[] %a3%+%a5%+%a7% EQU O+5+O goto[] a5set\r\nif[] %a3%+%a5%+%a7% EQU 3+O+O goto[] a3set\r\ngoto[] Defence\r\nlabel[] Defence\r\nif[] %a1%+%a2%+%a3% EQU X+X+3 goto[] a3set\r\nif[] %a1%+%a2%+%a3% EQU 1+X+X goto[] a1set\r\nif[] %a1%+%a2%+%a3% EQU X+2+X goto[] a2set\r\nif[] %a4%+%a5%+%a6% EQU X+X+6 goto[] a6set\r\nif[] %a4%+%a5%+%a6% EQU X+5+X goto[] a5set\r\nif[] %a4%+%a5%+%a6% EQU 4+X+X goto[] a4set\r\nif[] %a7%+%a8%+%a9% EQU X+X+9 goto[] a9set\r\nif[] %a7%+%a8%+%a9% EQU 7+X+X goto[] a7set\r\nif[] %a7%+%a8%+%a9% EQU X+8+X goto[] a8set\r\nif[] %a1%+%a4%+%a7% EQU 1+X+X goto[] a1set\r\nif[] %a1%+%a4%+%a7% EQU X+4+X goto[] a4set\r\nif[] %a1%+%a4%+%a7% EQU X+X+7 goto[] a7set\r\nif[] %a2%+%a5%+%a8% EQU 2+X+X goto[] a2set\r\nif[] %a2%+%a5%+%a8% EQU X+5+X goto[] a5set\r\nif[] %a2%+%a5%+%a8% EQU X+X+8 goto[] a8set\r\nif[] %a3%+%a6%+%a9% EQU X+X+9 goto[] a9set\r\nif[] %a3%+%a6%+%a9% EQU 3+X+X goto[] a3set\r\nif[] %a3%+%a6%+%a9% EQU X+6+X goto[] a6set\r\nif[] %a1%+%a5%+%a9% EQU X+5+X goto[] a5set\r\nif[] %a1%+%a5%+%a9% EQU X+X+9 goto[] a9set\r\nif[] %a1%+%a5%+%a9% EQU 1+X+X goto[] a1set\r\nif[] %a3%+%a5%+%a7% EQU X+X+7 goto[] a7set\r\nif[] %a3%+%a5%+%a7% EQU X+5+X goto[] a5set\r\nif[] %a3%+%a5%+%a7% EQU 3+X+X goto[] a3set\r\ngoto[] Random\r\nlabel[] Random\r\neq[] attack=%Random% * 9 / 32768 +1\r\neq[] cycle=%cycle%+1\r\nif[] %cycle% LEQ 1 goto[] Random\r\nif[] %attack% EQU 1 goto[] a1set\r\nif[] %attack% EQU 2 goto[] a2set\r\nif[] %attack% EQU 3 goto[] a3set\r\nif[] %attack% EQU 4 goto[] a4set\r\nif[] %attack% EQU 5 goto[] a5set\r\nif[] %attack% EQU 6 goto[] a6set\r\nif[] %attack% EQU 7 goto[] a7set\r\nif[] %attack% EQU 8 goto[] a8set\r\nif[] %attack% EQU 9 goto[] a9set\r\ngoto[] Random\r\nlabel[] a1set\r\nif[] %s1% EQU N goto[] Random\r\nvar[] a1=O\r\nvar[] s1=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a2set\r\nif[] %s2% EQU N goto[] Random\r\nvar[] a2=O\r\nvar[] s2=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a3set\r\nif[] %s3% EQU N goto[] Random\r\nvar[] a3=O\r\nvar[] s3=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a4set\r\nif[] %s4% EQU N goto[] Random\r\nvar[] a4=O\r\nvar[] s4=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a5set\r\nif[] %s5% EQU N goto[] Random\r\nvar[] a5=O\r\nvar[] s5=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a6set\r\nif[] %s6% EQU N goto[] Random\r\nvar[] a6=O\r\nvar[] s6=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a7set\r\nif[] %s7% EQU N goto[] Random\r\nvar[] a7=O\r\nvar[] s7=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a8set\r\nif[] %s8% EQU N goto[] Random\r\nvar[] a8=O\r\nvar[] s8=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] a9set\r\nif[] %s9% EQU N goto[] Random\r\nvar[] a9=O\r\nvar[] s9=N\r\neq[] moves=%moves%+1\r\ngoto[] moncheck\r\nlabel[] moncheck\r\nif[] %a1%+%a2%+%a3% EQU O+O+O goto[] lose\r\nif[] %a4%+%a5%+%a6% EQU O+O+O goto[] lose\r\nif[] %a7%+%a8%+%a9% EQU O+O+O goto[] lose\r\nif[] %a1%+%a4%+%a7% EQU O+O+O goto[] lose\r\nif[] %a2%+%a5%+%a8% EQU O+O+O goto[] lose\r\nif[] %a3%+%a6%+%a9% EQU O+O+O goto[] lose\r\nif[] %a1%+%a5%+%a9% EQU O+O+O goto[] lose\r\nif[] %a3%+%a5%+%a7% EQU O+O+O goto[] lose\r\nif[] %moves% EQU 9 goto[] draw\r\ngoto[] Start\r\nlabel[] win\r\nclrscr[]\r\nprint[] You win!\r\nstop[] >nul\r\ngoto[] tictactoe\r\nlabel[] lose\r\nclrscr[]\r\nprint[] You lose!\r\nstop[] >nul\r\ngoto[] tictactoe\r\nlabel[] draw\r\nclrscr[]\r\nprint[] Draw!\r\nstop[] >nul\r\ngoto[] tictactoe\r\n"
  },
  {
    "path": "IDE.md",
    "content": "<div align=\"center\">\r\n  <img src=\"Resources/Branding/logo.png\" />\r\n  <br/>\r\n  <b>An experimental programming language</b>\r\n  <br/>\r\n  <br/>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/LICENSE.md\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/search?l=batchfile\"><img alt=\"language\" src=\"https://img.shields.io/badge/language-Batchfile-purple.svg\"></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/stargazers\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/FreakC-Foundation/FreakC?color=gold\"></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/.github/CONTRIBUTING.md\"><img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"></a>\r\n  <a href=\"https://discord.gg/eNwqK4APsD\"><img src=\"https://img.shields.io/discord/845855288245878784.svg\"/></a>\r\n  <img alt=\"Windows\" src=\"https://img.shields.io/static/v1?label=&message=Windows&color=0078D6&logo=Windows\">\r\n</div>\r\n\r\n## Sublime text 3\r\nIn \"[FreakC/Utilities/Scripts](Utilities/Scripts)\" there is a file called \"[FreakC.sublime-build](Utilities/Scripts/FreakC.sublime-build)\" which is the Sublime Text's build system for FreakC. To use it, please paste it in the \"%APPDATA%\\Sublime Text v\\Packages\\User\" or wherever your Packages folder is. Then, make sure that you have set the environment variable for FreakC. After that, you will be able to compile FreakC codes in Sublime Text.\r\n\r\nFor syntax highlighting, copy the \"FreakC\" folder in the same folder, then paste it in \"%APPDATA%\\Sublime Text v\\Packages\\\".\r\n\r\n## Note\r\nSupport for VSCode had been discontinued since we recreated the whole language. However, supports for Sublime Text is still being developed, so Sublime is probably the go-to editor for FreakC.\r\n"
  },
  {
    "path": "LICENSE.md",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n  <img src=\"Resources/Branding/logo.png\" />\n  <br/>\n  <b>An experimental programming language</b>\n  <br/>\n  <br/>\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/LICENSE.md\"><img src=\"https://img.shields.io/badge/license-Apache%202.0-blue.svg\"/></a>\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/search?l=batchfile\"><img alt=\"language\" src=\"https://img.shields.io/badge/language-Batchfile-purple.svg\"></a>\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/stargazers\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/FreakC-Foundation/FreakC?color=gold\"></a>\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/.github/CONTRIBUTING.md\"><img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"></a>\n  <a href=\"https://discord.gg/eNwqK4APsD\"><img src=\"https://img.shields.io/discord/845855288245878784.svg\"/></a>\n  <img alt=\"Windows\" src=\"https://img.shields.io/static/v1?label=&message=Windows&color=0078D6&logo=Windows\">\n</div>\n\n## Note\nI have taken a little break from FreakC and Batch coding as a whole, I might do a rewrite for FreakC in the future when I'm free.\n\nOther than that, I'm working on JeChain, check it out if you are interested!\n\n<br/>\n\n<a href=\"https://github.com/nguyenphuminh/JeChain\"><img src=\"https://github-readme-stats.vercel.app/api/pin/?username=nguyenphuminh&repo=JeChain\"/></a>\n\n<br/>\n\n## What is FreakC ?\n`print[] Hello, World.`\n\nFreakC is a nice, little, multi-paradigm programming language, which looks like Batch, compiles to Batch and is written in Batch as well. It is mainly built to be an experimental project with the idea of creating a programming language in such a limited language like Batch, but then it turns out that FreakC has added a little bit of features to Batch that might come in handy for some Batch developers. Batch's commands should work with FreakC most of the time, however, there are some quirks you should consider checking out which I have mentioned in the next part of this document.\n\nAnd yes, this is not a C dialect, it's more like `C` in `ArnoldC`.\n\n### Language preview\nHello World:\n\n    print[] Hello, World!\n\nFunction definition:\n\n    function[] SayHello\n        print[] Hello\n    endfunc[]\n    \n    :: Calling \"SayHello\" function, printing out \"Hello\"\n    SayHello[..]\n    \n    :: This will also work, because Batch's commands work in FreakC:\n    call SayHello\n\nClass-based object-oriented programming:\n\n    :: Create a class called \"Dog\"\n    class[] Dog\n        :: Init method\n        method[] init\n            var[] $this.age=%~2\n            var[] $this.weight=%~3\n        endmethod[]\n\t\t\n        method[] BeingCute\n            print[] *Being cute*\n        endmethod[]\n    endclass[]\n\nFreakC's commands end with `[]` or a special operator to indicate that it's FreakC code, so it doesn't cause confusion with Batch codes in your code.\n    \n[More samples](https://github.com/FreakC-Foundation/FreakC/tree/master/Examples)\n[Join the small community on Discord!!!](https://discord.gg/eNwqK4APsD)\n\n### Switching from Batch to FreakC\nWhile FreakC is compatible with Batch, but it's not 100% compatible, you just need to replace all `!` with `^!`, `^^!` with `^^^^^!` (the second one is only required in enabled delayed expansion). If you use codes that depends on blank lines, then just change them to the `!` character to create a blank line entirely, or just use Batch's `^`.\n\n### FreakC's added features compared to Batch\n* While loops, repeat-until loops, and FreakC's own for loops with break/continue supports.\n* Switch cases.\n* Class-based OOP.\n* A bunch of utility functions for you to use.\n* Inline functions.\n* Macros.\n* Some minimal operators.\n* Floating-point numbers.\n* Some additional commands.\n\nThere are still more! [Get started now!](https://github.com/FreakC-Foundation/FreakC/blob/master/TUTORIAL.md)\n\n### Stuffs you would expect from a scripting language\n* Multi-paradigm (procedural, object-oriented, data-oriented...).\n* General purpose.\n* Dynamically typed.\n* Short, simple, packed with utility functions to help coding easier.\n* Easy to set up and use since it's written in Batch, you can just download the compiler and start coding.\n* Extremely light compiler which weighs less than 40kb! \n\n### Should you use FreakC?\n* As a Batch developer: Sure, but be aware that this project is still in BETA, and hasn't reached 1.0. \n* As a open-source developer: You can 100% use my code for your project, but please follow the conditions from Apache-2.0 License, and at least credit me in the README.\n* As a beginner to programming: No, just no, Batch and FreakC are things created by dark magic.\n* AS a real deal programmer: No, Batch and FreakC are slow and weird, their community is small, and there are not much good frameworks out there.\n\n### Todos\n* Concurrent model.\n* More utility functions.\n* Nicer inheritance and polymorphism for OOP.\n\n## What comes with the devkit ?\n* A compiler.\n* A command line shell.\n* A command line interface.\n* Some utilities.\n* Some examples.\n\n## Language resources\n* [Tutorials](https://github.com/FreakC-Foundation/FreakC/blob/master/TUTORIAL.md)\n* [Samples](https://github.com/FreakC-Foundation/FreakC/tree/master/Examples)\n* [IDEs](IDE.md)\n\n## Frameworks and libraries\n### Official FreakC's frameworks\n* <a href=\"https://github.com/FreakC-Foundation/discord.fclang\">discord.fclang</a> - A discord api wrapper built on top of Discord.net, can be used for bot dev.\n\n### Cool Batch frameworks/libraries\n* <a href=\"https://github.com/timlg07/Number.cmd\">Number.cmd</a> - A library for evaluating floating point number.\n* <a href=\"https://github.com/mininmobile/discord.bat\">Discord.bat</a> - A discord api wrapper built on top of Discord.net, can be used for bot dev.\n\n### Batch game frameworks\nThere are many existing game engines for Batch/FreakC:\n\n* <a href=\"https://github.com/Berry2460/cmd-berryengine\">Berry</a>\n* <a href=\"https://github.com/nguyenphuminh/Corpse\">Corpse</a>\n* <a href=\"https://github.com/Berry2460/shade_engine\">Shade</a>\n* <a href=\"https://github.com/Honguito98/Seta-Engine-for-Batch-games\">Seta</a>\n\n## Contribute\nWe would love to have you as a contributor! Please consider checking out [contribution guidelines](https://github.com/FreakC-Foundation/FreakC/blob/master/.github/CONTRIBUTING.md) first!\n\n## Support the project!\nIf you like FreakC, it would be great if you leave a star here ❤️. I'd love if you follow me as well 😘.\n\nTo push the project's development faster, I'd love if you buy me a coffee by sending me some cryptos into my BEP-20 wallet: `0x1848Ba922d6eD66D4910176998fF4fa77AEb82D5`\n\n### Sponsors\n* Top sponsor: @anapple96\n\n## Resources\n* <a href=\"https://www.facebook.com/FreakC-Programming-Language-111425377421861\">Facebook</a>\n* <a href=\"https://discord.gg/eNwqK4APsD\">Discord</a>\n* <a href=\"https://freakc-foundation.github.io/\">Offical Website</a>\n\n## Languages based on FreakC\nI've created this tiny language for Vietnamese using the FreakC's codebase:\n* <a href=\"https://github.com/nguyenphuminh/VNC\">VNC</a>\n\n## Contributors\n* Owner/Developer: @nguyenphuminh.\n* VSCode contributor: @anapple96.\n\n## Repo's contributors\n<a href=\"https://github.com/FreakC-Foundation/FreakC/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=FreakC-Foundation/FreakC\" />\n</a>\n\n## Copyrights and License\nCopyright © 2020-2021 Nguyen Phu Minh published under the Apache 2.0 License\n"
  },
  {
    "path": "Source/FCShell.bat",
    "content": "@echo off\r\n\r\necho.>tar.fclang\r\n\r\necho. FreakC's interactive shell\r\necho. ==========================\r\necho. Version 0.1.0\r\necho.\r\necho.\r\n\r\n:loop\r\n\r\nset /p inp=\r\n\r\nif \"%inp%\" == \"start[]\" (\r\n\tstart freakc tar.fclang\r\n) else if \"%inp%\" == \"endcli[]\" (\r\n\tdel /q tar.fclang\r\n\t\r\n\tif exist tar.bat del /q tar.bat\r\n\t\r\n\texit /b\r\n) else if \"%inp%\" == \"wipe[]\" (\r\n\techo.>tar.fclang\r\n) else if \"%inp%\" == \"clr[]\" (\r\n\tcls\r\n) else (\r\n\techo %inp%>>tar.fclang\r\n)\r\n\r\ngoto loop\r\n"
  },
  {
    "path": "Source/FreakC.bat",
    "content": "@echo off\nsetlocal enabledelayedexpansion\n\n::------------------------------------------------------------------------------\n:: Init macros\n::------------------------------------------------------------------------------\n\n:: New line\nset NLM=^\n\n\nset NL=^^^%NLM%%NLM%^%NLM%%NLM%\nset LF=^^%NL%\n\n\n::------------------------------------------------------------------------------\n:: Command line interface\n::------------------------------------------------------------------------------\n\nset helpCheck=false\nif \"%1\" == \"\" (\n\tset helpCheck=true\n\tset pauseAcp=true\n)\nif \"%1\" == \"--help\" set helpCheck=true\n\nif \"%helpCheck%\" == \"true\" (\n\techo. Usage: freakc {option/name} {option}\n\techo.\n\techo. Options:\n\techo.\n\techo.  --help     :Have to be the first parameter, shows all options\n\techo.  --shell    :Have to be the first parameter, open shell.\n\techo.  --version  :Have to be the first parameter, shows the current version of the DevKit.\n\techo.  --compile  :Have to be the second parameter, compile the file only.\n\techo.  --candr    :Have to be the second parameter, compile and shows compiled code.\n\techo.  --create   :Have to be the second parameter, create a new FreakC project.\n\techo.  --clrlib   :Have to be the first parameter, delete all standard libraries in the folder.\n\techo.  --clrbat   :Have to be the first parameter, delete all Batch files in the folder.\n\techo.  --keep     :Have to be the first parameter, keep all the .inline files and .method files.\n\techo.\n\techo. [Leave the second {option} blank if you want to both compile and run the file]\n\tif \"%pauseAcp%\" == \"true\" pause >nul\n\texit /b\n)\n\nif \"%1\" == \"--version\" goto fcversion\n\nif \"%2\" == \"--compile\" set fccompile=true\nif \"%2\" == \"--candr\" set fcread=true\nif \"%2\" == \"--create\" set fccreate=true\nif \"%2\" == \"--keep\" (\n\tset keepmethod=true\n\tset keepinline=true\n\tset fccompile=true\n)\n\nif \"%1\" == \"--shell\" (\n\tFCShell\n\texit /b\n)\n\nif \"%1\" == \"--clrlib\" (\n\tfor /r %%i in (*.bat) do (\n\t\tset name=%%i\n\t\tif \"!name:fclib=!\" NEQ \"!name!\" del /q %%i\n\t)\n\texit /b\n)\n\nif \"%1\" == \"--clrbat\" (\n\tfor /r %%i in (*.bat) do (\n\t\tset name=%%i\n\t\tset clearCheck=false\n\t\tif \"!name:FreakC.bat=!\" NEQ \"!name!\" set clearCheck=true\n\t\tif \"!name:FCShell.bat=!\" NEQ \"!name!\" set clearCheck=true\n\t\tif \"!name:createFile.bat=!\" NEQ \"!name!\" set clearCheck=true\n\t\tif \"!name:libgen.bat=!\" NEQ \"!name!\" set clearCheck=true\n\t\tif \"!clearCheck!\" == \"false\" del /q %%i\n\t)\n\texit /b\n)\n\nif \"%fccreate%\" == \"true\" (\n\tmd %output%\n\tcd %output%\n\tif \"%3\" == \"--empty\" (\n\t\tif \"%4\" == \"--de-enabled\" echo enb_delay[]>%output%.fclang\n\t\techo.>>%output%.fclang\n\t) else (\n\t\tif \"%3\" == \"--de-enabled\" echo enb_delay[]>%output%.fclang\n\t\techo print[] Hello World, Hello FreakC^^!>>%output%.fclang\n\t)\n\texit /b\n)\n\n\n::------------------------------------------------------------------------------\n:: Compiling\n::------------------------------------------------------------------------------\n\n:: Get the input file\nset fccompilename=%1\nset output=%fccompilename:.fclang=%\n\n:: Config\nset fccomment=false\nset proctar=something\nset inlftar=something\nset classtar=something\nset methodtar=something\nset fchcomment=false\nset /a wloopnum=0, wloopnum2=0, matchInd=0, forInd=0, wloopInd=0, wloopInd2=0, prevLoopInd=0\n\n:: Pre-stored codes\necho @echo off>%output%.bat\nif \"%2\" == \"--de-enabled\" echo setlocal enabledelayedexpansion>>%output%.bat\nif \"%3\" == \"--de-enabled\" echo setlocal enabledelayedexpansion>>%output%.bat\necho :FreakCCompiled>>%output%.bat\n\n:: Reading through each lines\nfor /f \"tokens=* delims=\t \" %%x in (%output%.fclang) do (\n\tset deniedToken=false\n\tset printString=%%x\n\tfor %%a in (%%x) do (\n\t\tset ch=%%a\n\t\tif \"!ch:~-4!\" == \"[..]\" (\n\t\t\tset ch=!ch:[..]=!\n\t\t\tfor %%i in (!ch!) do set printString=!printString:%%a=call %%i!\n\t\t)\n\t\tif \"!ch:~-4!\" == \"[::]\" (\n\t\t\tset ch=!ch:[::]=!\n\t\t\tfor %%i in (!ch!) do set printString=!printString:%%a=call :%%i!\n\t\t)\n\t\tif \"%%a\" == \"c[]\" (\n\t\t\tset fccomment=true\n\t\t\tset printString=!printString:c[]=!\n\t\t)\n\t\tif \"%%a\" == \"e[]\" (\n\t\t\tset fccomment=false\n\t\t\tset printString=!printString:e[]=!\n\t\t)\n\t\tif \"%%a\" == \"h[]\" set deniedToken=true\n\t\tif \"%%a\" == \"ch[]\" set fchcomment=true\n\t\tif \"%%a\" == \"ce[]\" (\n\t\t\tset fchcomment=false\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == include[] (\n\t\t\tset targetFile=!printString:include[] =!\n\t\t\tif exist !targetFile!.fclang (\n\t\t\t\tcall createFile.bat \"!targetFile!\"\n\t\t\t\ttype !targetFile!.bat>>%output%.bat\n\t\t\t)\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == compile[] (\n\t\t\tset targetFile=!printString:compile[] =!\n\t\t\tif exist !targetFile!.fclang call createFile.bat \"!targetFile!\"\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == get_utils[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\t(\n\t\t\techo.set NLM=^^\n\t\t\techo.\n\t\t\techo.\n\t\t\techo.set NL=^^^^^^%%NLM%%%%NLM%%^^%%NLM%%%%NLM%%\n\t\t\techo.set LF=^^^^%%NL%%\n\t\t\t)>>!outtar!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == end[] set printString=!printString:end[]=exit /b 0!\n\t\tif %%a == gen_lib_func[] (\n\t\t\tcall libgen !printString:gen_lib_func[] =!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == function[] (\n\t\t\tset procval=0\n\t\t\tset procadd=true\n\t\t\tset proctar=!printString:function[] =!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endfunc[] (\n\t\t\tset procadd=false\n\t\t\tset proctar=none\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == inlinef[] (\n\t\t\tset inlfval=0\n\t\t\tset inlfadd=true\n\t\t\tset inlftar=!printString:inlinef[] =!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endinlf[] (\n\t\t\tset inlfadd=false\n\t\t\tset inlftar=none\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == class[] (\n\t\t\tset classval=0\n\t\t\tset classadd=true\n\t\t\tset classtar=!printString:class[] =!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endclass[] (\n\t\t\tset classadd=false\n\t\t\tset classtar=none\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == method[] (\n\t\t\tset methodval=0\n\t\t\tset methodadd=true\n\t\t\tset methodtar=!printString:method[] =!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endmethod[] (\n\t\t\tset methodadd=false\n\t\t\tset methodtar=none\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == new[] (\n\t\t\tset cprocess=!printString:new[] =!\n\t\t\tset turn=0\n\t\t\tfor %%i in (!cprocess!) do (\n\t\t\t\tif !turn! == 0 set target=%%i\n\t\t\t\tif !turn! == 1 set objname=%%i\n\t\t\t\tset /a turn+=1\n\t\t\t)\n\t\t\tfor /r %%i in (*.method) do (\n\t\t\t\tset name=%%i\n\t\t\t\tset name=!name:%cd%\\=!\n\t\t\t\tset _name=!name:.method=.bat!\n\t\t\t\tcall :get_len len !target!\n\t\t\t\tfor %%j in (!len!) do if \"!name:~0,%%j!\" == \"!target!\" ( \n\t\t\t\t\tfor /f \"delims=\" %%n in ('find /c /v \"\" !name!') do set \"slen=%%n\"\n\t\t\t\t\tset \"slen=!slen:*: =!\"\n\t\t\t\t\techo.>!objname!!_name:~%%j!\n\t\t\t\t\t<\"!name!\" (\n\t\t\t\t\t\tfor /L %%c in (1 1 !slen!) do (\n\t\t\t\t\t\t\tset /p line=\n\t\t\t\t\t\t\tif \"!line!\" NEQ \"\" for %%v in (!objname!) do (\n\t\t\t\t\t\t\t\tif \"!line:$this=!\" NEQ \"!line!\" (\n\t\t\t\t\t\t\t\t\techo !line:$this=%%v!>>!objname!!_name:~%%j!\n\t\t\t\t\t\t\t\t) else echo.!line!>>!objname!!_name:~%%j!\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tset line=\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\tif exist !objname!.init.bat (\n\t\t\t\tfor %%i in (!target!) do for %%j in (!objname!) do set printString=!printString:new[] %%i =call %%j.init.bat !\n\t\t\t) else set deniedToken=true\n\t\t)\n\t\tif %%a == extends[] (\n\t\t\tset target=!printString:extends[] =!\n\t\t\tfor /r %%i in (*.method) do (\n\t\t\t\tset name=%%i\n\t\t\t\tset name=!name:%cd%\\=!\n\t\t\t\tcall :get_len len !target!\n\t\t\t\tfor %%j in (!len!) do if \"!name:~0,%%j!\" == \"!target!\" ( \n\t\t\t\t\tfor /f \"delims=\" %%n in ('find /c /v \"\" !name!') do set \"slen=%%n\"\n\t\t\t\t\tset \"slen=!slen:*: =!\"\n\t\t\t\t\t<\"!name!\" (\n\t\t\t\t\t\tfor /L %%c in (1 1 !slen!) do (\n\t\t\t\t\t\t\tset /p line=\n\t\t\t\t\t\t\tif \"!line!\" NEQ \"\" for %%v in (!classtar!) do echo.!line!>>!classtar!!name:~%%j!\n\t\t\t\t\t\t\tset line=\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\tset deniedToken=true\n\t\t)\n\t\tset icall=false\n\t\tif \"!ch:~-4!\" == \"[//]\" (\n\t\t\tset icall=true\n\t\t\tset iprocess=!printString:[//]=!\n\t\t)\n\t\tif %%a == icall[] (\n\t\t\tset icall=true\n\t\t\tset iprocess=!printString:icall[] =!\n\t\t)\n\t\tif \"!icall!\" == \"true\" (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset deniedToken=true\n\t\t\tset turn=0\n\t\t\tfor %%i in (!iprocess!) do (\n\t\t\t\tif !turn! LEQ 0 (\n\t\t\t\t\tset inltar=%%i\n\t\t\t\t) else set inlargs[!turn!]=%%i\n\t\t\t\tset /a turn+=1\n\t\t\t)\n\t\t\tset /a turn-=1\n\t\t\tfor /f \"delims=\" %%n in ('find /c /v \"\" !inltar!.inline') do set \"len=%%n\"\n\t\t\tset \"len=!len:*: =!\"\n\t\t\t<\"!inltar!.inline\" (\n\t\t\t\tfor /L %%c in (1 1 !len!) do (\n\t\t\t\t\tset /p line=\n\t\t\t\t\tif !turn! == 0 (\n\t\t\t\t\t\techo.!line!>>!outtar!\n\t\t\t\t\t) else (\n\t\t\t\t\t\tfor /l %%z in (1 1 !turn!) do for %%v in (!inlargs[%%z]!) do if %%c GEQ 2 set line=!line:%%z[]=%%v!\n\t\t\t\t\t\techo.!line!>>!outtar!\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t\tif \"!ch:~-2!\" == \"[]\" (\n\t\t\tcall :get_len chlen !ch!\n\t\t\tset /a chlen-=2\n\t\t\tfor %%i in (!chlen!) do set chl=!ch:~0,%%i!\n\t\t\tfor %%i in (!ch!) do (\n\t\t\t\tif \"!ch:~0,7!\" == \"string_\" (\n\t\t\t\t\tcall libgen string !chl:~7!\n\t\t\t\t\tfor %%j in (!chl:~7!) do set printString=!printString:%%i=call fclib_string_%%j.bat!\n\t\t\t\t)\n\t\t\t\tif \"!ch:~0,5!\" == \"math_\" (\n\t\t\t\t\tcall libgen math !chl:~5!\n\t\t\t\t\tfor %%j in (!chl:~5!) do set printString=!printString:%%i=call fclib_math_%%j.bat!\n\t\t\t\t)\n\t\t\t\tif \"!ch:~0,4!\" == \"arr_\" (\n\t\t\t\t\tcall libgen array !chl:~4!\n\t\t\t\t\tfor %%j in (!chl:~4!) do set printString=!printString:%%i=call fclib_array_%%j.bat!\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t\tif %%a == max[] (\n\t\t\tcall libgen list max\n\t\t\tset printString=!printString:max[]=call fclib_list_max.bat!\n\t\t)\n\t\tif %%a == min[] (\n\t\t\tcall libgen list min\n\t\t\tset printString=!printString:min[]=call fclib_list_min.bat!\n\t\t)\n\t\tif %%a == sum[] (\n\t\t\tcall libgen list sum\n\t\t\tset printString=!printString:sum[]=call fclib_list_sum.bat!\n\t\t)\n\t\tif %%a == deny[] (\n\t\t\techo.>%output%.bat\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == drive[] set printString=!printString:drive[] =!:\n\t\tif %%a == while[] (\n\t\t\tset prevLoop[!prevLoopInd!]=while\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset fccondition=!printString:while[] =!\n\t\t\tset fcpos[!wloopInd!]=!wloopnum!\n\t\t\tfor %%i in (!wloopInd!) do (\n\t\t\t\t(\n\t\t\t\techo :WhileLoop!fcpos[%%i]!\n\t\t\t\techo if not !fccondition! goto EndLoop!fcpos[%%i]!\n\t\t\t\t)>>!outtar!\n\t\t\t)\n\t\t\tset /a wloopnum+=1\n\t\t\tset /a wloopInd+=1\n\t\t\tset /a prevLoopInd+=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == for[] (\n\t\t\tset prevLoop[!prevLoopInd!]=for\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset process=!printString:for[] =!\n\t\t\tfor /f \"tokens=1-4 delims= \" %%i in (\"!process!\") do (\n\t\t\t\tset varname[!forInd!]=%%i\n\t\t\t\tset start[!forInd!]=%%j\n\t\t\t\tset step[!forInd!]=%%k\n\t\t\t\tset end[!forInd!]=%%l\n\t\t\t)\n\t\t\tset fcpos[!wloopInd!]=!wloopnum!\n\t\t\tfor %%i in (!wloopInd!) do (\n\t\t\t\tfor %%s in (!forInd!) do (\n\t\t\t\t\t(\n\t\t\t\t\techo set !varname[%%s]!=!start[%%s]!\n\t\t\t\t\techo :WhileLoop!fcpos[%%i]!\n\t\t\t\t\techo if ^^!!varname[%%s]!^^! GEQ !end[%%s]! goto EndLoop!fcpos[%%i]!\n\t\t\t\t\t)>>!outtar!\n\t\t\t\t)\n\t\t\t)\n\t\t\tset /a wloopnum+=1, wloopInd+=1, forInd+=1, prevLoopInd+=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tset whileCheck=false\n\t\tset acceptFor=false\n\t\tif %%a == endfor[] (\n\t\t\tset whileCheck=true\n\t\t\tset acceptFor=true\n\t\t)\n\t\tif %%a == endwhile[] set whileCheck=true\n\t\tif \"!whileCheck!\" == \"true\" (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset /a _wloopInd=!wloopInd!-1\n\t\t\tfor %%i in (!_wloopInd!) do (\n\t\t\t\tif \"!acceptFor!\" == \"true\" (\n\t\t\t\t\tset /a forInd-=1\n\t\t\t\t\tfor %%s in (!forInd!) do echo set /a !varname[%%s]!+=!step[%%s]!>>!outtar!\n\t\t\t\t)\n\t\t\t\techo goto WhileLoop!fcpos[%%i]!>>!outtar!\n\t\t\t\techo :EndLoop!fcpos[%%i]!>>!outtar!\n\t\t\t)\n\t\t\tset /a wloopInd-=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == breakl[] (\n\t\t\tset /a _wloopInd=!wloopInd!-1\n\t\t\tset /a _wloopInd2=!wloopInd2!-1\n\t\t\tset /a prevLoopInd-=1\n\t\t\tfor %%i in (!prevLoopInd!) do (\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"for\" for %%y in (!_wloopInd!) do for %%s in (!fcpos[%%y]!) do set printString=!printString:breakl[]=goto EndLoop%%s!\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"while\" for %%y in (!_wloopInd!) do for %%s in (!fcpos[%%y]!) do set printString=!printString:breakl[]=goto EndLoop%%s!\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"repeat\" for %%y in (!_wloopInd2!) do for %%s in (!fcpos2[%%y]!) do set printString=!printString:breakl[]=goto UntilLoop%%s!\n\t\t\t)\n\t\t)\n\t\tif %%a == continue[] (\n\t\t\tset /a _forInd=!forInd!-1\n\t\t\tset /a _wloopInd=!wloopInd!-1\n\t\t\tset /a _wloopInd2=!wloopInd2!-1\n\t\t\tset /a prevLoopInd-=1\n\t\t\tfor %%i in (!prevLoopInd!) do (\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"for\" for %%y in (!_wloopInd!) do for %%s in (!fcpos[%%y]!) do for %%k in (!_forInd!) do for %%q in (!varname[%%k]!) do for %%z in (!step[%%k]!) do set printString=!printString:continue[]=set /a %%q+=%%z ^& goto WhileLoop%%s!\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"while\" for %%y in (!_wloopInd!) do for %%s in (!fcpos[%%y]!) do set printString=!printString:continue[]=goto WhileLoop%%s!\n\t\t\t\tif \"!prevLoop[%%i]!\" == \"repeat\" for %%y in (!_wloopInd2!) do for %%s in (!fcpos2[%%y]!) do set printString=!printString:continue[]=goto RepeatLoop%%s!\n\t\t\t)\n\t\t)\n\t\tif %%a == repeat[] (\n\t\t\tset prevLoop[!prevLoopInd!]=repeat\n\t\t\tset prevLoop=repeat\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset fcpos2[!wloopInd2!]=!wloopnum2!\n\t\t\tfor %%i in (!wloopInd2!) do echo :RepeatLoop!fcpos2[%%i]!>>!outtar!\n\t\t\tset /a wloopnum2+=1\n\t\t\tset /a prevLoopInd+=1\n\t\t\tset /a wloopInd2+=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == until[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset /a _wloopInd2=!wloopInd2!-1\n\t\t\tset fccondition2=!printString:until[] =!\n\t\t\tfor %%i in (!_wloopInd2!) do (\n\t\t\t\t(\n\t\t\t\techo if !fccondition2! goto UntilLoop!fcpos2[%%i]!\n\t\t\t\techo goto RepeatLoop!fcpos2[%%i]!\n\t\t\t\techo :UntilLoop!fcpos2[%%i]!\n\t\t\t\t)>>!outtar!\n\t\t\t)\n\t\t\tset /a wloopInd2-=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == begin[] set printString=!printString:begin[]=(!\n\t\tif %%a == done[] set printString=!printString:done[]=^)!\n\t\tif %%a == match[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset matchConds[!matchInd!]=!printString:match[] =!\n\t\t\techo set matchChecked!matchInd!=false>>!outtar!\n\t\t\tset /a matchInd+=1\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == case[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset /a _matchInd=!matchInd!-1\n\t\t\tfor %%i in (!_matchInd!) do (\n\t\t\t\t(\n\t\t\t\techo if !matchConds[%%i]! == !printString:case[] =! (\n\t\t\t\techo set matchChecked%%i=true\n\t\t\t\t)>>!outtar!\n\t\t\t)\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == default[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\tset /a _matchInd=!matchInd!-1\n\t\t\tfor %%i in (!_matchInd!) do echo if \"^!matchChecked%%i^!\" == \"false\" (>>!outtar!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endcase[] (\n\t\t\tif \"!procadd!\" == \"true\" (set outtar=!proctar!.bat) else if \"!inlfadd!\" == \"true\" (set outtar=!inlftar!.inline) else (set outtar=%output%.bat)\n\t\t\techo ^)>>!outtar!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == endmatch[] (\n\t\t\tset deniedToken=true\n\t\t\tset /a matchInd-=1\n\t\t)\n\t\tif %%a == key[] set printString=!printString:key[] =CHOICE /C:! /N\n\t\tif %%a == uprint[] set printString=!printString:uprint[]=echo!\n\t\tif %%a == print[] set printString=!printString:print[] =echo.!\n\t\tif %%a == fprint[] set printString=!printString:fprint[] =echo:!\n\t\tif %%a == create_dir[] set printString=!printString:create_dir[]=md!\n\t\tif %%a == change_dir[] set printString=!printString:change_dir[]=cd!\n\t\tif %%a == del[] set printString=!printString:del[]=del!\n\t\tif %%a == remove_dir[] set printString=!printString:remove_dir[]=rmdir!\n\t\tif %%a == read_file[] set printString=!printString:read_file[]=type!\n\t\tif %%a == int[] (\n\t\t\tset printString=!printString:int[]=set /a!\n\t\t\tset printString=!printString:++=+=1!\n\t\t\tset printString=!printString:--=-=1!\n\t\t)\n\t\tif %%a == eq[] (\n\t\t\tset printString=!printString:eq[]=set /a!\n\t\t\tset printString=!printString:++=+=1!\n\t\t\tset printString=!printString:--=-=1!\n\t\t)\n\t\tif %%a == define[] (\n\t\t\tset !printString:define[]=!\n\t\t\tset deniedToken=true\n\t\t)\n\t\tif %%a == logoff[] set printString=!printString:logoff[]=SHUTDOWN /l!\n\t\tif %%a == hibernate_shutdown[] set printString=!printString:hibernate_shutdown[]=SHUTDOWN /h!\n\t\tif %%a == float[] (\n\t\t\tcall libgen float float\n\t\t\tset printString=!printString:float[]=call fclib_float.bat!\n\t\t)\n\t\tif %%a == var[] set printString=!printString:var[]=set!\n\t\tif %%a == cnd[] (\n\t\t\tcall libgen util cnd\n\t\t\tset printString=!printString:cnd[]=call fclib_util_cnd.bat!\n\t\t)\n\t\tif %%a == inp[] set printString=!printString:inp[]=set /p!\n\t\tif %%a == goto[] set printString=!printString:goto[]=goto!\n\t\tif %%a == call[] set printString=!printString:call[]=call!\n\t\tif %%a == lcall[] set printString=!printString:lcall[] =call :!\n\t\tif %%a == change_color[] set printString=!printString:change_color[]=color!\n\t\tif %%a == change_mode[] set printString=!printString:change_mode[]=mode!\n\t\tif %%a == change_title[] set printString=!printString:change_title[]=title!\n\t\tif %%a == rename[] set printString=!printString:rename[]=ren!\n\t\tif %%a == mov[] set printString=!printString:mov[]=move!\n\t\tif %%a == copy[] set printString=!printString:copy[]=copy!\n\t\tif %%a == open[] set printString=!printString:open[]=start!\n\t\tif %%a == quit[] set printString=!printString:quit[]=exit!\n\t\tif %%a == inf_loop[] set printString=!printString:inf_loop[]=goto FreakCCompiled!\n\t\tif %%a == imd_shutdown[] set printString=!printString:imd_shutdown[]=shutdown -s -t 0!\n\t\tif %%a == imd_restart[] set printString=!printString:imd_restart[]=shutdown -r -t 0!\n\t\tif %%a == clrscr[] set printString=!printString:clrscr[]=cls!\n\t\tif %%a == restart_after[] set printString=!printString:restart_after[]=shutdown -r -t!\n\t\tif %%a == shutdown_after[] set printString=!printString:shutdown_after[]=shutdown -s -t!\n\t\tif %%a == imd_shutdowns[] set printString=!printString:imd_shutdowns[]=SHUTDOWN /p!\n\t\tif %%a == stop[] set printString=!printString:stop[]=pause!\n\t\tif %%a == local[] set printString=!printString:local[]=SETLOCAL!\n\t\tif %%a == endloc[] set printString=!printString:endloc[]=ENDLOCAL!\n\t\tif %%a == see_date[] set printString=!printString:see_date[]=date /t!\n\t\tif %%a == see_time[] set printString=!printString:see_time[]=time /t!\n\t\tif %%a == change_date[] set printString=!printString:change_date[]=date!\n\t\tif %%a == change_time[] set printString=!printString:change_time[]=time!\n\t\tif %%a == ls[] set printString=!printString:ls[]=dir!\n\t\tif %%a == if[] set printString=!printString:if[]=if!\n\t\tif %%a == if_el[] set printString=!printString:if_el[]=if errorlevel!\n\t\tif %%a == if_not_el[] set printString=!printString:if_not_el[]=if not errorlevel!\n\t\tif %%a == if_not[] set printString=!printString:if_not[]=if not!\n\t\tif %%a == if_defined[] set printString=!printString:if_defined[]=if defined!\n\t\tif %%a == if_exist[] set printString=!printString:if_exist[]=if exist!\n\t\tif %%a == if_not_exist[] set printString=!printString:if_not_exist[]=if not exist!\n\t\tif %%a == if_not_defined[] set printString=!printString:if_not_defined[]=if not defined!\n\t\tif %%a == el[] set printString=!printString:el[]=else!\n\t\tif %%a == elif[] set printString=!printString:elif[]=else if!\n\t\tif %%a == label[] set printString=!printString:label[] =:!\n\t\tif %%a == wait[] set printString=!printString:wait[]=timeout /nobreak /t!\n\t\tif %%a == loop[] set printString=!printString:loop[]=for /l!\n\t\tif %%a == scan_files[] set printString=!printString:scan_files[]=for /r!\n\t\tif %%a == scan_strs[] set printString=!printString:scan_strs[]=for /f!\n\t\tif %%a == scan_str[] set printString=!printString:scan_str[]=for!\n\t\tif %%a == scan_dir[] set printString=!printString:scan_dir[]=for /d!\n\t\tif %%a == ping[] set printString=!printString:ping[]=ping!\n\t\tif %%a == sysinf[] set printString=!printString:sysinf[]=systeminfo!\n\t\tif %%a == ipinf[] set printString=!printString:ipinf[]=ipconfig /all!\n\t\tif %%a == hello_world[] set printString=!printString:hello_world[]=echo Hello, World!\n\t\tif %%a == unicode[] set printString=!printString:unicode[]=chcp 65001!\n\t\tif %%a == curl[] set printString=!printString:curl[]=curl!\n\t\tif %%a == fndstr[] set printString=!printString:ndfstr[]=findstr!\n\t\tif %%a == fnd[] set printString=!printString:fnd[]=find!\n\t\tif %%a == ps[] set printString=!printString:ps[]=powershell!\n\t\tif %%a == enb_delay[] set printString=!printString:enb_delay[]=setlocal enabledelayedexpansion!\n\t\tif %%a == dis_delay[] set printString=!printString:dis_delay[]=setlocal disabledelayedexpansion!\n\t)\n\n\t:: Writing into output file\n\tif not \"!fchcomment!\" == \"true\" (\n\t\tif \"!procadd!\" == \"true\" (\n\t\t\tif !procval! == 0 (\n\t\t\t\tset procval=1\n\t\t\t\techo.>!proctar!.bat\n\t\t\t) else (\n\t\t\t\tif \"!fccomment!\" == \"true\" (\n\t\t\t\t\techo.::!printString!>>!proctar!.bat\n\t\t\t\t) else if not \"!deniedToken!\" == \"true\" (\n\t\t\t\t\techo.!printString!>>!proctar!.bat\n\t\t\t\t)\n\t\t\t)\n\t\t) else if \"!inlfadd!\" == \"true\" (\n\t\t\tif !inlfval! == 0 (\n\t\t\t\tset inlfval=1\n\t\t\t\techo.>!inlftar!.inline\n\t\t\t) else (\n\t\t\t\tif \"!fccomment!\" == \"true\" (\n\t\t\t\t\techo.::!printString!>>!inlftar!.inline\n\t\t\t\t) else if not \"!deniedToken!\" == \"true\" (\n\t\t\t\t\techo.!printString!>>!inlftar!.inline\n\t\t\t\t)\n\t\t\t)\n\t\t) else if \"!methodadd!\" == \"true\" (\n\t\t\tif !methodval! == 0 (\n\t\t\t\tset methodval=1\n\t\t\t\tif !methodtar! NEQ init echo.>!classtar!.!methodtar!.method\n\t\t\t) else (\n\t\t\t\tif \"!fccomment!\" == \"true\" (\n\t\t\t\t\techo.::!printString!>>!classtar!.!methodtar!.method\n\t\t\t\t) else if not \"!deniedToken!\" == \"true\" (\n\t\t\t\t\techo.!printString!>>!classtar!.!methodtar!.method\n\t\t\t\t)\n\t\t\t)\n\t\t) else (\n\t\t\tif \"!fccomment!\" == \"true\" (\n\t\t\t\techo.::!printString!>>%output%.bat\n\t\t\t) else if not \"!deniedToken!\" == \"true\" (\n\t\t\t\techo.!printString!>>%output%.bat\n\t\t\t)\n\t\t)\n\t)\n)\n\n:: Delete the inline and method files if needed.\nif \"%keepinline%\" NEQ \"true\" if exist *.inline del /q *.inline\nif \"%keepmethod%\" NEQ \"true\" if exist *.method del /q *.method\n\n:: Disable delayed expansion so that the code can work fine on the console.\nsetlocal disabledelayedexpansion\n\nif \"%fcread%\" == \"true\" type %output%.bat\nif not \"%fccompile%\" == \"true\" if not \"%fcread%\" == \"true\" call %output%.bat\nexit /b\n\n:fcversion\necho FreakC DevKit Version 0.19.6 BETA\nexit /b\n\n:: A function to calculate string's length\n:get_len\nset len=0\nset str=%~2\n:loop\nif not \"!str:~%len%!\" == \"\" set /a len+=1 & goto loop\nset %~1=%len%\nexit /b\n"
  },
  {
    "path": "Source/createFile.bat",
    "content": "freakc %~1 --keep\r\n"
  },
  {
    "path": "Source/libgen.bat",
    "content": "call :%~1_%~2\r\nexit /b 0\r\n:float_float\r\necho for /f %%%%i in ('powershell %%~2'^) DO set %%~1=%%%%i>fclib_float.bat\r\nexit /b 0\r\n:array_qsort\r\n(\r\necho set /a l=%%~2, h=%%~3, a=^^!h^^!-^^!l^^!+1, top=-1\r\necho for /l %%%%i in (0 1^) do (set stack[%%%%i]=0\r\necho if %%%%i GEQ ^^!a^^! goto end^)\r\necho :end\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!l^^!\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!h^^!\r\necho :WhileLoop0\r\necho if not ^^!top^^! GEQ 0 goto EndLoop0\r\necho for %%%%j in (^^!top^^!^) do set /a h=^^!stack[%%%%j]^^!, top-=1\r\necho for %%%%j in (^^!top^^!^) do set /a l=^^!stack[%%%%j]^^!, top-=1\r\necho for %%%%j in (^^!h^^!^) do set pivot=^^!%%~1[%%%%j]^^!\r\necho set /a i=^^!l^^!-1, _high=^^!h^^!-1\r\necho for /l %%%%i in (^^!l^^! 1 ^^!_high^^!^) do (\r\necho if ^^!%%~1[%%%%i]^^! LEQ ^^!pivot^^! (\r\necho set /a i+=1\r\necho for %%%%j in (^^!i^^!^) do (\r\necho set temp=^^!%%~1[%%%%j]^^!\r\necho set %%~1[%%%%j]=^^!%%~1[%%%%i]^^!\r\necho set %%~1[%%%%i]=^^!temp^^!^)^)^)\r\necho set /a _i=^^!i^^!+1\r\necho for %%%%m in (^^!_i^^!^) do (\r\necho set temp=^^!%%~1[%%%%m]^^!\r\necho for %%%%j in (^^!h^^!^) do set %%~1[%%%%m]=^^!%%~1[%%%%j]^^!\r\necho set %%~1[^^!h^^!]=^^!temp^^!^)\r\necho set /a p=^^!i^^!+1\r\necho set /a _res1=^^!p^^!-1, _res2=^^!p^^!+1\r\necho if ^^!_res1^^! GTR ^^!l^^! (\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!l^^!\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!_res1^^!^)\r\necho if ^^!_res2^^! LSS ^^!h^^! (\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!_res2^^!\r\necho set /a top+=1\r\necho set stack[^^!top^^!]=^^!h^^!^)\r\necho goto WhileLoop0\r\necho :EndLoop0\r\necho exit /b 0\r\n)>fclib_array_qsort.bat\r\nexit /b\r\n:array_max\r\n(\r\necho set /a len=%%~3-1\r\necho setlocal enabledelayedexpansion\r\necho set max=^^!%%~2[0]^^!\r\necho for %%%%i in (0,1,%%len%%^) do if ^^!%%~2[%%%%i]^^! GTR %%max%% set max=^^!%%~2[%%%%i]^^!\r\necho (endlocal ^& set %%~1=%%max%%^)\r\n)>fclib_array_max.bat\r\nexit /b 0\r\n:array_min\r\n(\r\necho set /a len=%%~3-1\r\necho setlocal enabledelayedexpansion\r\necho set min=^^!%%~2[0]^^!\r\necho for %%%%i in (0,1,%%len%%^) do if ^^!%%~2[%%%%i]^^! LSS %%min%% set min=^^!%%~2[%%%%i]^^!\r\necho (endlocal ^& set %%~1=%%min%%^)\r\n)>fclib_array_min.bat\r\nexit /b 0\r\n:array_sum\r\n(\r\necho set /a len=%%~3-1\r\necho set sum=0\r\necho setlocal enabledelayedexpansion\r\necho for %%%%i in (0,1,%%len%%^) do set /a sum+=^^!%%~2[%%%%i]^^!\r\necho (endlocal ^& set %%~1=%%sum%%^)\r\n)>fclib_array_sum.bat\r\nexit /b 0\r\n:array_join\r\n(\r\necho set /a len=%%~3-1\r\necho setlocal enabledelayedexpansion\r\necho for %%%%i in (0,1,%%len%%^) do set res=^^!res^^!^^!%%~2[%%%%i]^^!\r\necho (endlocal ^& set %%~1=%%res%%^)\r\n)>fclib_array_join.bat\r\nexit /b 0\r\n:array_length\r\n(\r\necho set res_len=0\r\necho :loop\r\necho if not defined %%~2[%%res_len%%] (\r\necho \tset %%~1=%%res_len%%\r\necho \texit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop\r\n)>fclib_array_length.bat\r\nexit /b 0\r\n:array_includes\r\n(\r\necho set res_len=0\r\necho setlocal enabledelayedexpansion\r\necho :loop\r\necho if \"^!%%~3[%%res_len%%]^!\" == \"%%~2\" (\r\necho    endlocal ^& set %%~1=true\r\necho    exit /b\r\necho ^) else if %%res_len%% GEQ %%~4 (\r\necho    endlocal ^& set %%~1=false\r\necho    exit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop\r\n)>fclib_array_includes.bat\r\nexit /b\r\n:array_indexOf\r\n(\r\n    exit /b 0\r\necho set res_len=0\r\necho setlocal enabledelayedexpansion\r\necho :loop\r\necho if \"^!%%~3[%%res_len%%]^!\" == \"%%~2\" (\r\necho \tendlocal ^& set %%~1=%%res_len%%\r\necho \texit /b\r\necho ^) else if %%res_len%% GEQ %%~4 (\r\necho \tendlocal ^& set %%~1=-1\r\necho \texit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop\r\n)>fclib_array_indexOf.bat\r\nexit /b 0\r\n:array_lastIndexOf\r\n(\r\necho set /a res_len=%%~4-1\r\necho setlocal enabledelayedexpansion\r\necho :loop\r\necho if \"^!%%~3[%%res_len%%]^!\" == \"%%~2\" (\r\necho \tendlocal ^& set %%~1=%%res_len%%\r\necho \texit /b\r\necho ^) else if %%res_len%% LEQ 0 (\r\necho \tendlocal ^& set %%~1=-1\r\necho \texit /b\r\necho ^)\r\necho set /a res_len-=1\r\necho goto :loop\r\n)>fclib_array_lastIndexOf.bat\r\nexit /b 0\r\n:array_push\r\necho set %%~1[%%~3]=%%~2>fclib_array_push.bat\r\nexit /b\r\n:array_pop\r\n(\r\necho set /a len=%%~2-1\r\necho set %%~1[%%len%%]^=\r\n)>fclib_array_pop.bat\r\nexit /b\r\n:array_shift\r\n(\r\necho set len=%%~2\r\necho for /l %%%%i in (0 1 ^^!len^^!^) do (\r\necho     set /a ind=%%%%i+1\r\necho     for %%%%j in (^^!ind^^!^) do set %%~1[%%%%i]=^^!%%~1[%%%%j]^^!\r\necho ^)\r\necho exit /b\r\n)>fclib_array_shift.bat\r\nexit /b\r\n:array_unshift\r\n(\r\necho set len=%%~2\r\necho for /l %%%%i in (1 1 ^^!len^^!^) do (\r\necho     set /a ind=%%%%i-1\r\necho     for %%%%j in (^^!ind^^!^) do set _arr[%%%%i]=^^!%%~1[%%%%j]^^!\r\necho ^)\r\necho for /l %%%%i in (1 1 ^^!len^^!^) do set %%~1[%%%%i]=^^!_arr[%%%%i]^^!\r\necho set %%~1[0]=%%~2\r\necho exit /b\r\n)>fclib_array_unshift.bat\r\nexit /b\r\n:array_reverse\r\n(\r\necho set /a len=%%~2-1, _len=0\r\necho for /l %%%%i in (^^!len^^! -1 0^) do (\r\necho     for %%%%j in (^^!_len^^!^) do set _arr[%%%%j]=^^!%%~1[%%%%i]^^!\r\necho     set /a _len+=1\r\necho ^)\r\necho for /l %%%%i in (0 1 ^^!len^^!^) do set %%~1[%%%%i]=^^!_arr[%%%%i]^^!\r\necho exit /b\r\n)>fclib_array_reverse.bat\r\nexit /b\r\n:array_clear\r\n(\r\necho set ind=0\r\necho :loop\r\necho if %%ind%% GEQ %%~2 exit /b\r\necho set %%~1[%%ind%%]=\r\necho set /a ind+=1\r\necho goto loop\r\n)>fclib_array_clear.bat\r\nexit /b\r\n:array_fill\r\n(\r\necho set ind=%%~3\r\necho :loop\r\necho set %%~1[%%ind%%]=%%~2\r\necho if %%ind%% GEQ %%~4 exit /b\r\necho set /a ind+=1\r\necho goto loop\r\n)>fclib_array_fill.bat\r\nexit /b\r\n:array_splice\r\n(\r\necho call :length len %%~1\r\necho for /l %%%%i in (%%~2 1 ^^!len^^!^) do (\r\necho     set /a ind=%%%%i+%%~3\r\necho     for %%%%j in (^^!ind^^!^) do set %%~1[%%%%i]=^^!%%~1[%%%%j]^^!\r\necho ^)\r\necho exit /b\r\necho :length\r\necho set res_len=0\r\necho :loop\r\necho if not defined %%~2[%%res_len%%] (\r\necho     set %%~1=%%res_len%%\r\necho     exit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop\r\n)>fclib_array_splice.bat\r\nexit /b\r\n:math_abs\r\n(\r\necho set tar=%%~2\r\necho set %%~1=%%tar:-=%%\r\n)>fclib_math_abs.bat\r\nexit /b 0\r\n:math_even\r\n(\r\necho set /a res=%%~2 %%%% 2\r\necho if %%res%% == 0 (\r\necho \tset %%~1=true\r\necho ^) else (\r\necho \tset %%~1=false\r\necho ^)\r\n)>fclib_math_even.bat\r\nexit /b 0\r\n:math_odd\r\n(\r\necho set /a res=%%~2 %%%% 2\r\necho if %%res%% == 0 (\r\necho \tset %%~1=false\r\necho ^) else (\r\necho \tset %%~1=true\r\necho ^)\r\n)>fclib_math_odd.bat\r\nexit /b 0\r\n:math_pow\r\n(\r\necho set res=%%~2\r\necho set /a t=%%~3 - 1\r\necho for /l %%%%i in (1,1,%%t%%^) do (\r\necho \tset /a res*=%%res%%\r\necho ^)\r\necho set %%~1=%%res%%\r\n)>fclib_math_pow.bat\r\nexit /b 0\r\n:math_factorial\r\n(\r\necho set mul=1\r\necho for /l %%%%i in (1,1,%%~2^) do set /a mul*=%%%%i\r\necho set %%~1=%%mul%%\r\n)>fclib_math_factorial.bat\r\nexit /b 0\r\n:string_lower\r\n(\r\necho set lower=%%~2\r\necho set lower=%%lower:A=a%%\r\necho set lower=%%lower:B=b%%\r\necho set lower=%%lower:C=c%%\r\necho set lower=%%lower:D=d%%\r\necho set lower=%%lower:E=e%%\r\necho set lower=%%lower:F=f%%\r\necho set lower=%%lower:G=g%%\r\necho set lower=%%lower:H=h%%\r\necho set lower=%%lower:I=i%%\r\necho set lower=%%lower:J=j%%\r\necho set lower=%%lower:K=k%%\r\necho set lower=%%lower:L=l%%\r\necho set lower=%%lower:M=m%%\r\necho set lower=%%lower:N=n%%\r\necho set lower=%%lower:O=o%%\r\necho set lower=%%lower:P=p%%\r\necho set lower=%%lower:Q=q%%\r\necho set lower=%%lower:R=r%%\r\necho set lower=%%lower:S=s%%\r\necho set lower=%%lower:T=t%%\r\necho set lower=%%lower:U=u%%\r\necho set lower=%%lower:V=v%%\r\necho set lower=%%lower:W=w%%\r\necho set lower=%%lower:X=x%%\r\necho set lower=%%lower:Y=y%%\r\necho set lower=%%lower:Z=z%%\r\necho set %%~1=%%lower%%\r\n)>fclib_string_lower.bat\r\nexit /b 0\r\n:string_upper\r\n(\r\necho set upper=%%~2\r\necho set upper=%%upper:a=A%%\r\necho set upper=%%upper:b=B%%\r\necho set upper=%%upper:c=C%%\r\necho set upper=%%upper:d=D%%\r\necho set upper=%%upper:e=E%%\r\necho set upper=%%upper:f=F%%\r\necho set upper=%%upper:g=G%%\r\necho set upper=%%upper:h=H%%\r\necho set upper=%%upper:i=I%%\r\necho set upper=%%upper:j=J%%\r\necho set upper=%%upper:k=K%%\r\necho set upper=%%upper:l=L%%\r\necho set upper=%%upper:m=M%%\r\necho set upper=%%upper:n=N%%\r\necho set upper=%%upper:o=O%%\r\necho set upper=%%upper:p=P%%\r\necho set upper=%%upper:q=Q%%\r\necho set upper=%%upper:r=R%%\r\necho set upper=%%upper:s=S%%\r\necho set upper=%%upper:t=T%%\r\necho set upper=%%upper:u=U%%\r\necho set upper=%%upper:v=V%%\r\necho set upper=%%upper:w=W%%\r\necho set upper=%%upper:x=X%%\r\necho set upper=%%upper:y=Y%%\r\necho set upper=%%upper:z=Z%%\r\necho set %%~1=%%upper%%\r\n)>fclib_string_upper.bat\r\nexit /b 0\r\n:string_slice\r\n(\r\necho set /a len=%%~4-%%~3\r\necho set str=%%~2\r\necho setlocal enabledelayedexpansion\r\necho set str=^^!str:~%%~3,%%len%%^^!\r\necho endlocal ^& set %%~1=%%str%%\r\n)>fclib_string_slice.bat\r\nexit /b 0\r\n:string_length\r\n(\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho :loop\r\necho if not \"^!str:^~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho (endlocal ^& set %%~1=%%len%%^)\r\n)>fclib_string_length.bat\r\nexit /b 0\r\n:string_reverse\r\n(\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho set newstr=\r\necho :loop\r\necho if not \"^!str:^~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho set /a strlen=%%len%%-1\r\necho for /l %%%%i in (%%strlen%%,-1,0^) do set newstr=^^!newstr^^!^^!str:^~%%%%i,1^^!\r\necho (endlocal ^& set %%~1=%%newstr%%^)\r\n)>fclib_string_reverse.bat\r\nexit /b 0\r\n:string_chr\r\n(\r\necho if \"%%~2\" == \"\" exit /b\r\necho if %%~2 LSS 32 exit /b\r\necho if %%~2 GTR 126 exit /b\r\necho set alphabet= ^^!\"#$%%%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^^^^_`abcdefghijklmnopqrstuvwxyz{|}~\"\r\necho setlocal enabledelayedexpansion\r\necho set /a var=%%~2-32\r\necho set char=^^!alphabet:~%%var%%,1^^!\r\necho endlocal ^& set %%~1=^^%%char%%\r\n)>fclib_string_chr.bat\r\nexit /b 0\r\n:string_ord\r\n(\r\necho setlocal enabledelayedexpansion\r\necho set target=%%~2\r\necho set alphabet= ^^^^^^^^^^!\"#$%%%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^^^^_`abcdefghijklmnopqrstuvwxyz{|}~\"\r\necho for /l %%%%i in (0,1,94^) do if \"^!alphabet:~%%%%i,1^!\" == \"^!target:~0,1^!\" set /a res=%%%%i+32\r\necho endlocal ^& set %%~1=%%res%%\r\n)>fclib_string_ord.bat\r\nexit /b 0\r\n:string_startswith\r\n(\r\necho set str=%%~2\r\necho call :length \"len\" \"%%~3\"\r\necho setlocal enabledelayedexpansion\r\necho if \"^!str:~%%~4,%%len%%^!\" == \"%%~3\" (\r\necho \t(endlocal ^& set %%~1=true^)\r\necho ^) else (\r\necho \t(endlocal ^& set %%~1=false^)\r\necho ^)\r\necho exit /b\r\necho :length\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho :loop\r\necho if not \"^!str:~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho (endlocal ^& set %%~1=%%len%%^)\r\necho exit /b\r\n)>fclib_string_startswith.bat\r\nexit /b\r\n:string_endswith\r\n(\r\necho set str=%%~2\r\necho call :length \"len\" \"%%~3\"\r\necho setlocal enabledelayedexpansion\r\necho set str=^^!str:~0,19^^!\r\necho if \"^!str:~-%%len%%^!\" == \"%%~3\" (\r\necho \t(endlocal ^& set %%~1=true^)\r\necho ^) else (\r\necho \t(endlocal ^& set %%~1=false^)\r\necho ^)\r\necho exit /b\r\necho :length\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho :loop\r\necho if not \"^!str:~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho (endlocal ^& set %%~1=%%len%%^)\r\nexit /b\r\n)>fclib_string_endswith.bat\r\nexit /b\r\n:string_indexOf\r\n(\r\necho set res_len=0\r\necho set str=%%~3\r\necho call :length sublen \"%%~2\"\r\necho call :length strlen \"%%~3\"\r\necho setlocal enabledelayedexpansion\r\necho :loop1\r\necho set /a res_len1=%%res_len%% - %%sublen%%\r\necho if \"^!str:~%%res_len%%,%%sublen%%^!\" == \"%%~2\" (\r\necho \tendlocal ^& set %%~1=%%res_len%%\r\necho \texit /b\r\necho ^) else if %%res_len1%% GEQ %%strlen%% (\r\necho \tendlocal ^& set %%~1=-1\r\necho \texit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop1\r\necho :length\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho :loop\r\necho if not \"^!str:~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho (endlocal ^& set %%~1=%%len%%^)\r\necho exit /b\r\n)>fclib_string_indexOf.bat\r\n:string_lastIndexOf\r\n(\r\necho set str=%%~3\r\necho call :length sublen \"%%~2\"\r\necho call :length strlen \"%%~3\"\r\necho set /a res_len=%%strlen%% - %%sublen%%\r\necho setlocal enabledelayedexpansion\r\necho :loop1\r\necho if \"^!str:~%%res_len%%,%%sublen%%^!\" == \"%%~2\" (\r\necho \tendlocal ^& set %%~1=%%res_len%%\r\necho \texit /b\r\necho ^) else if %%res_len%% LSS 0 (\r\necho \tendlocal ^& set %%~1=-1\r\necho \texit /b\r\necho ^)\r\necho set /a res_len+=1\r\necho goto :loop1\r\necho :length\r\necho setlocal enabledelayedexpansion\r\necho set len=0\r\necho set str=%%~2\r\necho :loop\r\necho if not \"^!str:~%%len%%^!\" == \"\" set /a len+=1 ^& goto loop\r\necho (endlocal ^& set %%~1=%%len%%^)\r\necho exit /b\r\n)>fclib_string_lastIndexOf.bat\r\nexit /b\r\n:string_trim\r\n(\r\necho setlocal enabledelayedexpansion\r\necho set str=%%~2\r\necho :loop\r\necho set check=false\r\necho if \"^!str:~0,1^!\" == \"\t\" set check=true\r\necho if \"^!str:~0,1^!\" == \" \" set check=true\r\necho if \"^!check^!\" == \"true\" (\r\necho \tset str=^^!str:~1^^!\r\necho \tgoto loop\r\necho ^)\r\necho :loop2\r\necho set check=false\r\n echo if \"^!str:~-1^!\" == \"\t\" set check=true\r\necho if \"^!str:~-1^!\" == \" \" set check=true\r\necho if \"^!check^!\" == \"true\" (\r\necho \tset str=^^!str:~0,-1^^!\r\necho \tgoto loop2\r\necho ^)\r\necho (endlocal ^& set %%~1=%%str%%^)\r\necho exit /b\r\n)>fclib_string_trim.bat\r\nexit /b\r\n:list_max\r\n(\r\necho set max=1\r\necho for %%%%i in ^(%%~2^) do (\r\necho \tset max=%%%%i\r\necho \tgoto fcmaxend\r\necho ^)\r\necho :fcmaxend\r\necho for %%%%i in (%%~2^) do if %%%%i GTR %%max%% set max=%%%%i\r\necho set %%~1=%%max%%\r\n)>fclib_list_max.bat\r\nexit /b 0\r\n:list_min\r\n(\r\necho set min=1\r\necho for %%%%i in ^(%%~2^) do (\r\necho \tset min=%%%%i\r\necho \tgoto fcminend\r\necho ^)\r\necho :fcminend\r\necho for %%%%i in (%%~2^) do if %%%%i LSS %%min%% set min=%%%%i\r\necho set %%~1=%%min%%\r\n)>fclib_list_min.bat\r\nexit /b 0\r\n:list_sum\r\n(\r\necho set sum=0\r\necho for %%%%i in ^(%%~2^) do set /a sum+=%%%%i\r\necho set %%~1=%%sum%%\r\n)>fclib_list_sum.bat\r\nexit /b 0\r\n:util_cnd\r\necho if %%~2 (set %%~1=%%~3^) else set %%~1=%%~4>fclib_util_cnd.bat\r\nexit /b 0"
  },
  {
    "path": "TUTORIAL.md",
    "content": "<div align=\"center\">\r\n  <img src=\"Resources/Branding/logo.png\" />\r\n  <br/>\r\n  <b>An experimental programming language</b>\r\n  <br/>\r\n  <br/>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/LICENSE.md\"><img src=\"https://img.shields.io/badge/license-Apache%202.0-blue.svg\"/></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/search?l=batchfile\"><img alt=\"language\" src=\"https://img.shields.io/badge/language-Batchfile-purple.svg\"></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/stargazers\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/FreakC-Foundation/FreakC?color=gold\"></a>\r\n  <a href=\"https://github.com/FreakC-Foundation/FreakC/blob/master/.github/CONTRIBUTING.md\"><img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"></a>\r\n  <a href=\"https://discord.gg/eNwqK4APsD\"><img src=\"https://img.shields.io/discord/845855288245878784.svg\"/></a>\r\n  <img alt=\"Windows\" src=\"https://img.shields.io/static/v1?label=&message=Windows&color=0078D6&logo=Windows\">\r\n</div>\r\n\r\n# First note\r\nFreakC is a superset language which is transpiled to Batch, so pretty much all of FreakC's logic is Batch's, so it would be good if you check out the [Batch/CMD's official docs](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands) or [a simple Batch tutorial](https://www.tutorialspoint.com/batch_script/batch_script_syntax.htm)\r\n\r\n# Installation\r\nThere are many ways to install FreakC, you can:\r\n\r\n1. Clone FreakC from Github using:\r\n\r\n \t\tgit clone https://github.com/FreakC-Foundation/FreakC.git\r\n\r\n2. Install <a href=\"https://github.com/FreakC-Foundation/FreakC/releases\">here</a>.\r\n\r\n# Cli's usage\r\nIn the \"FreakC\" folder, open cmd and type this command to compile and run the code:\r\n\r\n    freakc file_name\r\n    \r\nExample:\r\n    \r\n    freakc \"Examples/HelloWorld.fclang\"\r\n \r\nIf you want to compile the code only, type:\r\n\r\n    freakc file_name --compile\r\n    \r\nIf you want to compile the code and show the compiled code, type:\r\n\r\n    freakc file_name --candr\r\n    \r\nTo show the current version of the devkit, type:\r\n\r\n    freakc --version\r\n\r\nTo create a new FreakC project quickly, you can type:\r\n\r\n    freakc project_name --create\r\n\r\nNotice that it will generate a file with a Hello World example in it, if you just want to create an empty file, type:\r\n\r\n    freakc project_name --create --empty \r\n\r\nYou can enable delayed expansion in the output with:\r\n\r\n    freakc file_name <some-option>(create/compile/candr or nothing) --de-enabled\r\n\r\nthis would be better than `enb_delay[]` in some cases.\r\n\r\nTo keep all the .inline files and .method files, type:\r\n\r\n    freakc --keep\r\n\r\nTo delete all stdlib files generated, type:\r\n\r\n    freakc --clrlib\r\n\r\nTo delete all Batch files, type:\r\n\r\n    freakc --clrbat\r\n    \r\nTo show all options and usage, type:\r\n\r\n    freakc --help\r\n    \r\nTo show all options and usage with pause, type:\r\n\r\n    freakc\r\n    \r\n### Interactive shell\r\nTo open interactive shell, type:\r\n\r\n    freakc --shell\r\n    ::Or fcshell\r\n    \r\nYou can type in whatever you want, it will be stored in \"tar.fclang\". You can type in any of these commands to execute tasks:\r\n\r\n* `start[]` - Runs all the codes written\r\n* `endcli[]` - Delete tar.fclang and exit\r\n* `wipe[]` - Resets codes\r\n* `clr[]` - Clear console\r\n\r\n# Print text\r\nTo print out a string or text, you can do it like this:\r\n\r\n\tprint[] string\r\n\r\nThe command is compiled to `echo.`, if you just want to use the traditional `echo`:\r\n\r\n\tuprint[] string\r\n\r\nIt's worth noticing that `print[]` might not work well with delayed expansion, but `uprint[]` does, so try using `uprint[]` if your program starts going weird. Also, since `uprint[]` is `echo`, it should work way faster than `print[]`. But `print[]` can print out an empty line easier, so it might worth combining them in your code.\r\n\r\nThere's also `fprint[]`, which is the fastest one, but however this one doesn't work with delayed expansion variables at all.\r\n\r\n## Store data \r\nYou can actually store data to a file by using:\r\n\r\n\tprint[] data>>file\r\n\t\r\n\t:: Overwrite:\r\n\tprint[] data>file\r\n\t\r\n\t:: Multi-line\r\n\t(\r\n\tprint[] data1\r\n\tprint[] data2\r\n\t)>file_name\r\n\r\n# Special characters\r\nUnlike any characters, \"!\" requires \"^\", for example:\r\n\r\n\t::This would causes no errors\r\n\tprint[] @#/\r\n\t\r\n\t::This would cause error (\"!\" will not be shown)\r\n\tprint[] !\r\n\t\r\n\t::Correct codes:\r\n\tprint[] ^!\r\n\r\n# Unicode characters\r\nTo start using Unicode character, type:\r\n\r\n\tunicode[] >nul\r\n\r\nSo now you can use Unicode characters:\r\n\r\n\tunicode[] >nul\r\n\tprint[] ă ê ©\r\n\t:: Would print out \"ă ê ©\"\r\n\r\n# Prints out command's text\r\nIf you type:\r\n\r\n\tprint[] print[]\r\n\r\nIt won't print out \"print[]\", but it will print out \"echo\", because FreakC will compiles any statement/command without caring if it's a used data or not. So to actually print out \"print[]\", you will need to add \"^\" in any place of the command. Example:\r\n\r\n\tprint[] print[^]\r\n\t:: This will print out \"print[]\"\r\n\r\n# Variables\r\n\r\n## Variables\r\n### String\r\nTo declare a variable, you can use:\r\n\r\n\tvar[] variable_name=string_value\r\n\t\r\nOr:\r\n\r\n\tvar[] \"variable_name=string_value\"\r\n\r\nMulti-line strings:\r\n\r\n\tlocal[] enabledelayedexpansion\r\n\tvar[] multi_line_string=Line 1^\r\n\t!\r\n\tLine 2^\r\n\t!\r\n\tLine 3\r\n\r\nWith normal Batch, you don't need the `!`, you just need a blank line. But with FreakC, the compiler skips through the new lines, so what it's doing is that it force the compiler to include that line (since that line still contain a character), and because `!` is skipped, it's an equivalent to an empty line.\r\n\r\nBut that way is just outdated, you can do that in a prettier way with a built-in `LF` macro:\r\n\r\n\tvar[] multi_line_string=Line 1!LF!\r\n\tLine 2!LF!\r\n\tLine 3!LF!\r\n\r\nThough you can also use something kind of an equivalent to `\\n` in other languages:\r\n\r\n\tvar[] multi_line_string=Line 1!NL!Line 2!NL!Line 3\r\n\r\n`!NL!` is a built-in macro.\r\n\r\nYou can also implement something like this:\r\n\r\n\tenb_delay[]\r\n\tvar[] n=sad^\r\n\t!\r\n\t!\r\n\tprint[] Hello^!n^!\r\n\tprint[] World\r\n\r\nBut the `!NL!` macro is fine enough.\r\n\r\nBut note that if you're using variables, make sure to enable delayed expansion or else it won't work!\r\n\r\nThere's also a command to enable Batch-style new line macros:\r\n\r\n\tget_util[]\r\n\r\n### Evaluate\r\nTo do math equations, do:\r\n\r\n\teq[] equation\r\n\r\nto store in a variable(which you should use and it's highly recommended):\r\n\r\n\teq[] variable_name=equation\r\n\r\nnote that you can do multiple equations at once:\r\n\r\n\teq[] variable_name1=equation1, variable_name2=equation2\r\n\r\nalso, if you want to use variables that are assigned in that exact same line, you must not use \"%\":\r\n\r\n\teq[] age=1, intel=age+1\r\n\t:: Variable \"intel\" will have the value of 2.\r\n\r\nA prettier alternative is `int[]`:\r\n\r\n\tint[] variable_name=equation\r\n\r\nNote that eq[] will always round up number, to do equation or to declare a variable as a float, do:\r\n\r\n\t:: Import float\r\n\timport[] float\r\n\tfloat[] \"variable_name\" \"equation\"\r\n\t\r\n\r\n### Console input\r\nTo declare a variable from user's input, try:\r\n\r\n\tinp[] variable_name=\r\n\r\nNote: If you do this, it will prints out \"Enter name:\" right next to the input\r\n\r\n\tinp[] variable_name=Enter name:\r\n\r\nTo read data from a file:\r\n\r\n\tinp[] variable_name=<file_name\r\n\r\nMulti-line:\r\n\r\n\t<file_name (\r\n\tinp[] var1=\r\n\tinp[] var2=\r\n\t)\r\n\r\n\r\n### Arrays, lists and tuples\r\n#### FreakC standard's naming\r\n* List: Multiple arguments delimitted by spaces, tails or semicolons.\r\n* Array: Variables that follow an order, which should make a collection of data.\r\n* Tuple: A list but should only be accessed through `scan_strs[]` or `for /f`.\r\n\r\n#### Arrays\r\nTo declare a variable as an array, use:\r\n\r\n\tvar[] arr[array_index]=\r\n\t\r\nEx:\r\n\t\r\n\tvar[] arr[0]=Hello\r\n\tvar[] arr[1]=100\r\n\r\nYou should only make array start at 0, or else it might not work with prebuilt libraries.\r\n\r\nNote that this not actually array, it's using the flexibility in naming of Batch/FreakC variables to receive the same effect.\r\n\r\nMulti-dimensional:\r\n\r\n\t:: A 2D array\r\n\tvar[] arr[0][0]=a\r\n\tvar[] arr[0][1]=b\r\n\tvar[] arr[1][0]=c\r\n\tvar[] arr[1][1]=d\r\n\r\nAlso, keep it in mind that this is the standard way of creating arrays in FreakC in order to receive a more \"defined\" structure to the code, as well as to make stuffs work well with the stdlib. You can also just do something like `var[] a\\1=0` then it would still work, but will not work with the stdlib.\r\n\r\nEvery time you create an array, you should create a variable that holds the length of the array (since `arr_length[]` doesn't work well if there's an empty element).\r\n\r\n\tvar[] arr[0]=1\r\n\tvar[] arr[1]=4\r\n\tvar[] arr[2]=0\r\n\t:: You can name it whatever you like, but I would say naming it in a form like \"name_len\" or \"name.len\" is the best.\r\n\tvar[] arr.len=3\r\n\r\nIf you make change to the array, be sure to update the length too since the length will matter a lot in many cases.\r\n\r\n#### List\r\nCreating a list:\r\n\t\r\n\tvar[] list=1 2 3 4 5\r\n\r\nSimplest way to iterate over **List**:\r\n\r\n\tvar[] list=1 2 3 4 5\r\n\tscan_str[] %%i in (%list%) do (\r\n\t\t:: Print out every elements\r\n\t\tprint[] %%i\r\n\t)\r\n\r\nIt's basically just like a foreach loop.\r\n\r\nIndexing:\r\n\r\n\tscan_strs[] \"tokens=<position> delims=<delimiter>\" %%i in (<list>) do (\r\n\t\t:: Print out the element at position <position>\r\n\t\tprint[] %%i\r\n\t)\r\n\r\nExample:\r\n\r\n\tvar[] list=1 2 3 4 5\r\n\tscan_strs[] \"tokens=3 delims= \" %%i in (%list%) do (\r\n\t\t:: Print out the element at position 3, which is 4\r\n\t\tprint[] %%i\r\n\t)\r\n\r\nGiven that, you can have another way to iterate over a list: just create a loop from 0 to the length of the list, and use indexing like this.\r\n\r\nList is extremely better in performance than array, and use much less memory since it doesn't create new variables, but it's not as convenient to just get a value from a specific index, and it's pretty hard to change values too. Make sure to use what serves you best.\r\n\r\n#### Tuples\r\n\r\n\tvar[] tuple=`Simon`Sawicki`\r\n\tfor /F \"tokens=1,2 delims=`\" %%a in (\"!tuple!\") do (\r\n\t\techo Name   : %%a\r\n\t\techo Surname: %%b\r\n\t)\r\n\r\nTechnically a tuple is a list but use a different delimitter, and can not be iteratable and should be immutable as well.\r\n\r\n### Maths \r\nYou can do Math equations with FreakC like this:\r\n\r\n\teq[] result=1+1+2+4\r\n\r\nIf you do this, variable \"result\" will be \"Hel + lo\"\r\n\r\n\tvar[] result=Hel + lo\r\n\t\r\n<b>Math operators</b>\r\n<br/>\r\n* `()                  - grouping`\r\n* `! ~ -               - unary operators`\r\n* `* / %               - arithmetic operators`\r\n* `+ -                 - arithmetic operators`\r\n* `<< >>               - logical shift`\r\n* `&                   - bitwise and`\r\n* `^                   - bitwise exclusive or`\r\n* `|                   - bitwise or`\r\n* `= *= /= %= += -=    - assignment`\r\n* `&= ^= |= <<= >>= , - expression separator`\r\n* `++ --               - plus/minus 1`\r\n\t\r\n### Merge strings\r\nTo merge strings, do this:\r\n\r\n\tvar[] str1=Hello\r\n\tvar[] str2=World\r\n\tvar[] str=%str1% %str2%\r\n\r\nSo the value of %str% is \"Hello World\"\r\n\r\nDon't merge string like this:\r\n\r\n\tvar[] str1=Hello\r\n\tvar[] str2=World\r\n\tvar[] str=%str1% + %str2%\r\n\t\r\nThis time, the value will be \"Hello + World\"\r\n\r\n\r\n### Use variables in different commands\r\nYou can use variables in FreakC commands as %variable_name%\r\n\r\nFor example, to print out a variable, you can do it like this:\r\n\r\n\tvar[] result=Hello World^!\r\n\tprint[] %result%\r\n\t\r\nBut, to print out an element of an array, you use:\r\n\r\n\tvar[] a[0]=Hello\r\n\tprint[] %a[0]%\r\n\t\r\nTo print out every element of an array, you can write something like this:\r\n\r\n\tlocal[] ENABLEDELAYEDEXPANSION\r\n\tvar[] a[0]=100\r\n\tvar[] a[1]=35\r\n\tvar[] a[2]=20\r\n\tloop[] %%n in (0,1,2) do ( \r\n   \t\tprint[] ^!a[%%n]^! \r\n\t)\r\n\t\r\n### Local and global variables\r\nYou can declare a global variable by just using all the ways mentioned recently.\r\n\r\nTo declare a variable locally, you will need to use:\r\n\r\n\tlocal[] \r\n\teq[] ans=100\r\n\tendloc[]\r\n\t\r\nlocal[] and endloc[] helps create a local environment.\r\n\r\nIn Batch, to use variable in for loops, or enables command prosessor's extensions, you would need:\r\n\r\n\tsetlocal ENABLEDELAYEDEXPANSION\r\n\tsetlocal ENABLEEXTENSIONS\r\n\t\r\nYou can also do that with local[]\r\n\r\n\tlocal[] ENABLEDELAYEDEXPANSION\r\n\tlocal[] ENABLEEXTENSIONS\r\n\r\nYou can shorten `local[] ENABLEDELAYEDEXPANSION` with:\r\n\r\n\tenb_delay[]\r\n\r\nSame with disable delayed expansion:\r\n\r\n\tdis_delay[]\r\n\t\r\n### Delayed expansion\r\nYou have seen some `^!` above, that's an essential feature gained from delayed expansion.\r\n\r\nIf you want to prints out the element at position \"i\" (i is variable) of an array, you'd maybe try to do this:\r\n\r\n\tprint[] %arr[%i%]%\r\n\t\r\nBut it doesn't work, because you'd need to use:\r\n\r\n\tlocal[] ENABLEDELAYEDEXPANSION\r\n\tprint[] ^!arr[%i%]^!\r\n\r\nAlso, if you change a value/declare a variable in a block of code locally in a normal way, it'd often not work outside the scope, so you should use delayed expansion pretty much all the time. Example:\r\n\r\nSuppose this code:\r\n\r\n\tif[] \"%getOption%\" EQU  \"yes\" (\r\n\t\tinp[] option=Enter option: \r\n\t\tprint[] Option read: %option%\r\n\t)\r\n\r\nPrevious code will NOT work becase %option% value is replaced just one time when the IF command is parsed (before it is executed). You need to \"delay\" variable value expansion until SET /P command had modified variable value:\r\n\r\n\tlocal[] EnableDelayedExpansion\r\n\tif \"%getOption%\" EQU \"yes\" (\r\n\t\tinp[] option=Enter option: \r\n\t\tprint[] Option read: ^!option^!\r\n\t)\r\n\r\nThis problem is taken from [this source](https://stackoverflow.com/questions/22278456/enable-and-disable-delayed-expansion-what-does-it-do)\r\n\r\nNotice that you're using `local[]`, which makes all the values defined locally, so remember to always add `endloc[]` (mostly when creating a function) to ensure everything works fine, like a `return` statement for example.\r\n\r\n\tfunction[] getHello\r\n\t\tlocal[] enabledelayedexpansion\r\n\t\t:: Returning a value\r\n\t\tendloc[] & var[] %~1=Hello\r\n\tendfunc[]\r\n\r\nAn example of sorting an array:\r\n\r\n\tinp[] n=The amount of element:\r\n\tloop[] %%i IN (1,1,%n%) DO inp[] arr[%%i]=Element %%i:\r\n\t\r\n\tlocal[] enabledelayedexpansion\r\n\tloop[] %%i IN (1,1,%n%) DO (\r\n\t\teq[] ind=%%i+1\r\n\t\tloop[] %%j IN (^!ind^!,1,%n%) DO (\r\n\t\t\tif[] ^!arr[%%i]^! GTR ^!arr[%%j]^! (\r\n\t\t\t\tvar[] temp=^!arr[%%i]^!\r\n\t\t\t\tvar[] arr[%%i]=^!arr[%%j]^!\r\n\t\t\t\tvar[] arr[%%j]=^!temp^!\r\n\t\t\t)\r\n\t\t)\r\n\t)\r\n\r\n\tprint[] Sorted:\r\n\tloop[] %%i IN (1,1,%n%) DO print[] Element %%i: ^!arr[%%i]^!\r\n\r\n### Special variables\r\n* %random% - A variable with the value as random numbers from 1 to 99999\r\n* %time% - A variable with the value as the current timer\r\n* %date% - A variable with the value as the current date\r\n* %cd% - A variable with the value as the current directory\r\n* %errorlevel% - A variable with the value as the current Batch errorlevel value\r\n* %cmdextversion% - A variable with the value as the current Command Processor Extensions version number\r\n* %cmdcmdline% - A variable with the value as the original command line that invoked the Command Processor\r\n* %path% - A variable with the value of PATH environment variable\r\n* %highestnumanodenumber% - A variable with the value as the highest NUMA node number on this machine\r\n\r\nThere are a lot of special variables left, but you might not find uses for them\r\n\r\n### Some features with variables\r\n* %variable_name:~0,-2% - would extract all but the last 2 characters of the variable\r\n* %variable_name:~-5% - would extract the last 5 characters of the variable\r\n* %variable_name:~5% - would remove the first 5 characters of the variable\r\n* %variable_name:str1=str2% - would replace str1 with str2\r\n* %PATH:~10,5% - would expand the PATH environment variable, and then use only the 5 characters that begin at the 11th (offset 10) character of the expanded result.  If the length is not specified, then it defaults to the remainder of the variable value.  If either number (offset or length) is negative, then the number used is the length of the environment variable value added to the offset or length specified\r\n\r\n### Batch-style macro\r\n\r\n\t:: A macro which prints out \"Hello\"\r\n\tvar[] hello= print[] Hello\r\n\t%hello%\r\n\t\r\nYou can join commands together like this:\r\n\r\n\tvar[] hello= print[] Hello ^& print[] Hell yeah^!\r\n\r\nYou can also pass arguments in by doing:\r\n\r\n\tvar[] macro_with_argument=for %%i in (argv) do echo %%i\r\n\t%macro_with_argument:argv=1 2 3% :: Will print out 1, 2, 3 on each new lines.\r\n\r\nWhat it did is simply just repace the macro with the command (of course), and `argv` in the string has been replaced by `1 2 3` which are now the arguments.\r\n\r\nYou can also create a mutli-line macro like how I did with multi-line string from above:\r\n\r\n\tvar[] macro_with_multi_commands=for %%i in (argv) do echo %%i!NL!echo Macro power %%i\r\n\r\nThis also work:\r\n\r\n\tvar[] macro_with_multi_commands=for %%i in (argv) do (!LF!\r\n\t\techo %%i!NL!echo Macro power %%i!LF!\r\n\t)\r\n\r\n### FreakC's macro\r\nThe Batch-style macro is the one being replaced in runtime. While it helps the program to run faster compared to calling functions, it's still kinda slow, so here comes the FreakC's true macro which is replaced during compile time:\r\n\r\n\t:: A macro which prints out \"Hello\"\r\n\tdefine[] hello= print[] Hello\r\n\t!hello!\r\n\r\nRemember that macros which acts like commands \"kinda\" require a \" \" in the back, but a normal macro doesn't:\r\n\r\n\tdefine[] key=124123\r\n\tprint[] The key is !key!\r\n\r\nFreakC's macro still works just like normal Batch variables, so you can also do stuffs like replace strings, generate substrings,...\r\n\r\n\tdefine[] key=124123\r\n\tprint[] The key is !key:~1,2!\r\n\t:: The result will be \"The key is 24\"\r\n\r\nBasically, it should work like normal Batch's variables. But currently, multi-line macro doesn't work :(\r\n\r\n### Alternative to macro\r\nIf you want an alternative, try reading at the [#Function] section. There will be docs about inlined functions, which are as fast as macros, but as nice as normal functions.\r\n\r\nSo why macro if inlined function is better? Well, simple, just don't use macro for any function-like stuffs, but macros can be good for stuffs like shorter naming, or really small tasks that usually just come as a form a single command :v\r\n\r\n### Notes\r\nAlso, spaces in FreakC is extremely important, so if you declare a variable like this:\r\n\r\n\teq[] abc = 100\r\n\r\nIt will declare the \"abc \" variable, so if you prints it out like this, it will not work\r\n\r\n\tprint[] %abc%\r\n\t\r\nYou will have to code like this:\r\n\r\n\tprint[] %abc %\r\n\t\r\nThen, it will prints out \" 100\"\r\n\r\nOther thing that you should notice is that \r\n\r\n\tvar[] text\r\n\t\r\nwould return any variable begins with \"text\"\r\n\r\n# Comments\r\n## The best way\r\n\r\n\t!= This is a comment =!\r\n\r\nBecause an undefined macro returns nothing, all the stuffs inside is gone in the compiler nicely. And because there are no variables named `= varname =`, we can use it safely. It's also the fastest one, since it's removed in compile time lol.\r\n\r\n## Batch's way\r\nSingle-line Batch comment:\r\n\r\n\t:: Comment\r\n\r\nThis might break in Batch's parenthesized block, but it's the fastest one.\r\n\r\nAnother way:\r\n\r\n\trem comment\r\n\t\r\nThis is the slowest one.\r\n\r\nAnother way:\r\n\r\n\t%=  =%\r\n\r\nIts performance is decent, and work all the time.\r\n\r\n## Old dumb way\r\nMulti-line comment that's transpiled to Batch comments:\r\n\r\n\tc[] line1\r\n\tline2\r\n\te[]\r\n\r\nTo write a comment that won't show up in the compiled codes, use:\r\n\r\n\th[] comment\r\n\t\r\nMulti-line version:\r\n\r\n\tch[] comment1\r\n\tcomment2\r\n\tce[]\r\n\r\n# Labels and Goto statement\r\nLabels helps you to jump to a state or pass parameters to execute tasks (somewhat procedural programming).\r\n\r\nTo create a label/procedure, you use:\r\n\r\n\tlabel[] label_name\r\n\r\nTo jump to a label, you use:\r\n\r\n\tgoto[] label_name\r\n\r\nTo call a label/procedure, you use:\r\n\r\n\tcall[] :label_name\r\n\r\nOr:\r\n\r\n\tlcall[] label_name\r\n\r\ncall[] can also targets file, while lcall[] can only targets label. For example, you can execute files like this:\r\n\r\n\tcall[] file_name\r\n\r\n### Differences between goto[] and call[]\r\ngoto[] jumps to a label and will not execute the previous code while call[] use code from the label but still execute the previous code.\r\n\r\nAlso, goto[] also supports parameters, which helps you a lot of time.\r\n\r\nFor examples, this code will print the sum of two parameters:\r\n\r\n\tgoto[] :plus 1 2\r\n\tlabel[] plus\r\n\teq[] ans=%~1 + %~2\r\n\tprint[] %ans%\r\n\r\nNote: You can pass arguments in FreakC are %~1, %~2,...\r\n\r\n### Notes\r\nTo restart the program, you can type:\r\n\r\n\tgoto[] FreakCCompiled\r\n\r\nIt is because the compiled code of FreakC is in a main label/procedure \"FreakCCompiled\"\r\n\r\nThis code would still work eventhough it contains special character\r\n\r\n\tlabel[] dsasd$ 123213 323\r\n\tgoto[] dsasd$ 123213 323\r\n\r\n## Shorter call statement\r\nYou can replace\r\n\r\n\tcall[] function_name \"arg1\" \"arg2\"\r\n\r\nwith\r\n\r\n\tfunction_name[..] \"arg1\" \"arg2\"\r\n\t\r\nThere's also one for calling labels:\r\n\r\n\tlabel_name[::] \"arg1\" \"arg2\"\r\n\t\r\n# Function\r\n## Function definition using `label[]`\r\n\r\n\t:: main code goes here\r\n\t:: Calling the function\r\n\tlcall[] function_name\r\n\t:: function_name[::]\r\n\tend[]\r\n\t\r\n\tlabel[] function_name\r\n\t\t:: function's code goes here\r\n\tend[]\r\n\r\n## Define function by creating a new Batch file\r\nYou can create a new file and call it manually, or you can use:\r\n\r\n\tfunction[] function_name\r\n\t\t:: Code goes here\r\n\tendfunc[]\r\n\r\nExample:\r\n\r\n\tfunction[] SayHello\r\n\t\tprint[] Hello\r\n\t\t:: Using the arguments\r\n\t\tprint[] %~1\r\n\t\t:: Safely exit the function\r\n\t\t:: end[]\r\n\tendfunc[]\r\n\t:: Prints \"Hello\"\r\n\tcall[] SayHello\r\n\t:: SayHello[..]\r\n\r\nThe upper code creates a file called \"SayHello.bat\" and just calls it.\r\n\r\nThis also works:\r\n\r\n\t(\r\n\tprint[] print[] Hello\r\n\tprint[] :: Using the arguments\r\n\tprint[] print[] %~1\r\n\tprint[] :: Safely exit the function\r\n\tprint[] :: end[]\r\n\t)>SayHello.bat\r\n\t:: Prints \"Hello\"\r\n\tcall[] SayHello\r\n\t:: SayHello[..]\r\n\r\nSo what's the difference? `function[]` is processed in compile time, but storing into the file manually is executed during runtime, so it's much faster and more convenient to just use `function[]`.\r\n\r\nFor some cases, you should add:\r\n\r\n\tend[]\r\n\r\nto properly exit the function. But technically, the function should works fine most of the time with out `end[]`.\r\n\r\n## Differences between labels and files\r\nBy using `function[]`, you are actually creating a new Batch file, but by using `label[]`, it's just calling a label, so it grants more speed. But by using `label[]`, the function will be defined locally in that specific file, while `function[]` generates a whole new file, so it can be accessed by other files with the given path.\r\n\r\nFor example, you have a `Main.fclang` file:\r\n\r\n\tfunction[] SayHello\r\n\t\tprint[] Hello\r\n\tendfunc[]\r\n\r\nand a folder named 'stuffs' at the same scope, with `stuffs.fclang` in it:\r\n\r\n\t:: You can call \"SayHello\" like this:\r\n\tcall[] ../SayHello.bat\r\n\r\nBoth ways are fine, `label[]`'s speed is bad when the main file's too large, `function[]`'s speed is bad when the user's drive has a lot of latency. If you want your code to be more structured, you should probably go with labels, but FreakC's mainly used for scripting, not something too big so both, again, are fine.\r\n\r\nNote that with both labels and `function[]`(files), you should use `local[]` and `endloc[]` to define the variables locally, So you can do something like this:\r\n\r\n\tfunction[] hello\r\n\t\tlocal[]\r\n\t\tvar[] sth=hello\r\n\t\t:: End local environment and return a value\r\n\t\tendloc[] & var[] %~1=%sth%\r\n\tendfunc[]\r\n\r\n## Return statement\r\nFunctions in FreakC are accessed through the call statement, so it's not an expression, so you can \"return\" a value by assigning value to selected variable.\r\n\r\nExample:\r\n\r\n\tfunction[] sum\r\n\t\teq[] %~1=%~2+%~3\r\n \tendfunc[]\r\n\t\r\n\t:: Variable \"sum\" will be granted the value \"3\"\r\n\tcall[] sum \"result\" \"1\" \"2\"\r\n\t:: sum[..] \"result\" \"1\" \"2\"\r\n\t\r\n\t:: Prints out 3\r\n\tprint[] %result%\r\n\t\r\n## Recursion\r\nYou can implement recursion by simply calling the function inside of it. For example, this is a program which will prints a string for \"n\" times:\r\n\r\n\tfunction[] printLoop\r\n\t\tprint[] %~1\r\n\t\teq[] n=%~2-1\r\n\t\tcall printLoop \"%~1\" \"%n%\"\r\n\tendfunc[]\r\n\r\nNote that using `call` will give you a recursion limit of about 339. To fix this problem you can use `cmd /c`, or just implement a goto command to exit the function, store the current state in a variable and call it again, that should give you infinite recursion limit.\r\n\r\n## Performance issues\r\nBoth using labels and `function[]` are fairly slow, if you want to improve performance, just use a normal Batch macro since it's much faster.\r\n\r\n## Inline function\r\nTo boost the speed up, I **highly suggest** using inlined functions. It's as fast as macros, and works just like normal functions :D\r\n\r\n\tinlinef[] somefunc\r\n\t\t:: Arg1\r\n\t\tprint[] 1[]\r\n\t\t:: Arg2\r\n\t\tprint[] 2[]\r\n\tendfunc[]\r\n\t\r\n\tsomefunc[//] arg1 arg2\r\n\t:: icall[] somefunc arg1 arg2\r\n\r\nHowever, there's currently a severe limitation: inline funtions can't be used with delayed expansion variables, it can only work with normal values and normal variables. I'll work hard to fix this problem soon!\r\n\r\n# Object Oriented Programming\r\n## Objects\r\nNote that there are no such things as \"objects\" in FreakC/Batch, but you can use the FreakC variable to gain the same effect as seen in other languages:\r\n\r\n\tvar[] dog.name=Mary\r\n\tvar[] dog.age=3\r\n\tfunction[] dog.move\r\n\t\tprint[] *Moving*\r\n\tendfunc[]\r\n\t\r\nOr you may have it like this (technically you can do it however you want because of how FreakC's variables work):\r\n\r\n\tvar[] dog[\"name\"]=Mary\r\n\tvar[] dog[\"age\"]=3\r\n\tfunction[] dog[\"move\"]\r\n\t\tprint[] *Moving*\r\n\tendfunc[]\r\n\r\nYou can access the elements normally:\r\n\r\n\tenb_delay[]\r\n\t\r\n\tprint[] %dog.age%\r\n\t\r\n\t:: An example with getting an element from input\r\n\tinp[] input=\r\n\tprint[] ^!dog.%input%^!\r\n\t:: If the input is \"name\" then the output will be \"Mary\"\r\n\r\n## Classes\r\nYou can implement a \"class\" like this:\r\n\r\n\t:: Create a class called \"Dog\"\r\n\tclass[] Dog\r\n\t\t:: Init method\r\n\t\tmethod[] init\r\n\t\t\t::Set properties, implementing \"this\" as the first argurment passed (%~1)\r\n\t\t\tvar[] %~1.age=%~2\r\n\t\t\tvar[] %~1.weight=%~3\r\n\t\tendmethod[]\r\n\t\t\r\n\t\tmethod[] BeingCute\r\n\t\t\tprint[] *Being cute*\r\n\t\tendmethod[]\r\n\tendclass[]\r\n\t\r\n\t:: Create an object\r\n\tnew[] Dog \"Mary\" \"3\" \"4kg\"\r\n\t:: Prints out \"age\" property of \"Mary\", which is \"3\"\r\n\tprint[] Age: %Mary.age%\r\n\t:: Call \"Mary.BeingCute\", which prints out \"*Being cute*\"\r\n\tcall[] Mary.BeingCute\r\n\r\n## Old crappy function-based oop\r\nYou can implement a \"class\" like this:\r\n\r\n\t:: Create a procedure called \"Dog\"\r\n\tfunction[] Dog\r\n\t\t::Set properties, implementing \"this\" as the first argurment passed (%~1)\r\n\t\tvar[] $this.age=%~2\r\n\t\tvar[] $this.weight=%~3\r\n\t\t:: Storing the codes inside a Batch file, which creates something like a method\r\n\t\t(\r\n\t\t\tprint[] print[] *Being cute*\r\n\t\t)>%~1.BeingCute.bat\r\n\tendfunc[]\r\n\r\n\t:: Create an object\r\n\tDog[..] \"Mary\" \"3\" \"4kg\"\r\n\t:: Prints out \"age\" property of \"Mary\", which is \"3\"\r\n\tprint[] Age: %Mary.age%\r\n\t:: Call \"Mary.BeingCute\", which prints out \"*Being cute*\"\r\n\tcall[] Mary.BeingCute\r\n\r\n## Class-based or function-based OOP?\r\nJust use classes, don't use functions, function is the old way. Classes are much more readable, and they are in fact faster, since the methods are generated in compile time, while in the function's way, it is generated in runtime, and creating/writing to files in runtime is **incredibly slow**.\r\n\r\n## Inhertitance and polymorphism\r\n### The new way: \r\n\r\n\textends[] parent_class\r\n\r\n### What will it do?\r\nIt will inherit all the methods from the parent class. Since there are no actual properties in FreakC's classes, it will simply copy the init function from the parent class and paste it in the one in the child class (if the child class has an init function lol). So technically you can say classes in FreakC are just things that create collections of methods.\r\n\r\n### The old way:\r\nThe old function way: You can create an init function and call it inside the \"classes\"(functions) you're creating.\r\n\r\n## Encapsulation\r\nWith encapsulation, you can implement getter/setter functions to implement protected, everytime the data got accessed it must go through a getter/setter function. With private, you do the same thing as protected, however, rather than putting it inside the init function, only add it in one specific \"class\"(function).\r\n\r\nKeep it in mind that there have been many attempts implementing OOP in Batch, the upper one is just my way to do it in FreakC.\r\n\r\n# If statements\r\nTo use if statement, check this out:\r\n\r\n\tif[] condition command_to_execute\r\n\t\r\nExample:\r\n\r\n\tvar[] abc=100\r\n\tif[] %abc% == 100 (\r\n\t\tprint[] abc is equal to 100\r\n\t)\r\n\t\r\n\t:: With strings\r\n\tvar[] str=Hello\r\n\tif[] \"%str%\" == \"Hello\" (\r\n\t\tprint[] Hello there\r\n\t)\r\n\r\nIt's actually a good practice to have the values in the comparison quoted.\r\n \t\r\nYou can actually use a Batch command in if[]. Example:\r\n\r\n\tvar[] abc=20\r\n\tif[] %abc% == 20 (\r\n\t\techo abc is equal to 100\r\n\t)\r\n\t\r\n## All the comparison operators:\r\n* \"==\" - Equal\r\n* \"EQU\" - Equal/numeric equal\r\n* \"NEQ\" - Not equal\r\n* \"LSS\" - Less than\r\n* \"LEQ\" - Less than or equal\r\n* \"GTE\" - Greater than\r\n* \"GEQ\" - Greater than or equal\r\n\r\n## Conditional expression\r\nThere are no actual \"conditional expression\" in FreakC, but here's something close to a \"ternary operator\":\r\n\r\n\tcnd[] var_name \"condition\" \"value1\" \"value2\"\r\n\r\nExample:\r\n\r\n\tcnd[] result \"1 EQU 2\" \"1 is equal to 2\" \"1 is not equal to 2\"\r\n\tprint[] %result% :: Will print out \"1 is not equal to 2\"\r\n\r\n## Other kinds or if statements:\r\n\r\n### Execute if a file exists\r\n\r\n\tif_exist[] file_name (\r\n\t\tcommand_to_execute\r\n\t)\r\n\t\r\n### Execute if a variable is defined\r\n\r\n\tif_defined[] variable_name (\r\n\t\tcommand_to_execute\r\n\t)\r\n\t\r\n### Execute if a condition is false\r\n\r\n\tif_not[] condtition (\r\n\t\tcommand_to_execute\r\n\t)\r\n\r\n### Else\r\n\r\n\tif[] condition (\r\n\t\tcommand1\r\n\t) elif[] condition2 (\r\n\t\tcommand2\r\n\t) el[] (\r\n\t\tcommand3\r\n\t)\r\n\r\n## Notes\r\nTo use if not for if_defined[] or if_exist[], you can do this:\r\n\r\n\tif_not_exist[] file (\r\n\t\tcommand_to_execute\r\n\t)\r\n\tif_not_defined[] file (\r\n\t\tcommand_to_execute\r\n\t)\r\n\t\r\n## Pressing keys with respond\r\nTo receive keys pressed, add:\r\n\r\n\tkey[] key\r\n\t\r\nFor examples, if you want the users to press one in \"wsad\", type:\r\n\r\n\tkey[] wsad\r\n\r\nTo perform any actions, you will need to use a special if statement:\r\n\r\n\tif_el[] position_of_key_in_key[]\r\n\r\nNote: actually, `if_el` gets the errorlevel variable's value.\r\n\r\nExample:\r\n\r\n\tkey[] wsad\r\n\tif_el[] 4 (\r\n\t\tprint[] You pressed \"D\"\r\n\t)\r\n\tif_el[] 3 (\r\n\t\tprint[] You pressed \"A\"\r\n\t)\r\n\tif_el[] 2 (\r\n\t\tprint[] You pressed \"S\"\r\n\t)\r\n\tif_el[] 1 (\r\n\t\tprint[] You pressed \"W\"\r\n\t) \r\n\r\n### If not errorlevel\r\nYou can use:\r\n\r\n\tif_not_el[]\r\n\t\r\nto use if not.\r\n\r\n# Switch case\r\nIf you're familiar with C, then this is FreakC's way on how to use a switch case:\r\n\r\n\tenb_delay[]\r\n\tmatch[] value\r\n\t\tcase[] value1\r\n\t\t:: Code\r\n\t\tendcase[]\r\n\t\tcase[] value2\r\n\t\t:: Code\r\n\t\tendcase[]\r\n\t\tdefault[]\r\n\t\t:: Code executed when no case is match, and this block is optional\r\n\t\tendcase[]\r\n\tendmatch[]\r\n\r\nBut currently there's limitations with this command, as it currently can't check multiple cases :/, will update the feature soon!!\r\n\r\n# Loops\r\n\r\n## For loops (in Batch)\r\n\r\n### Loops from \"start\" to \"end\" by \"step\"\r\n\r\n\tloop[] %%parameters in (start,step,end) do (\r\n\t)\r\n\t\r\n### Loops through files rooted in a folder\r\n\r\n\tscan_dir[] drive/directory %%parameters in (file) do (\r\n\t)\r\n\t\r\n### Loops through files, strings, or even the returned result of a command\r\n\r\n\tscan_strs[] \"tokens=position-position delims=delimiter\" %%parameters in (something) do (\t\r\n\t)\r\n\r\nIf `something` is double-quoted, then it is a string.\r\nIf `something` is single-quoted, then it is a command to be executed, and the parameter will be the returned content of the command.\r\nIf `something` is not quoted, then it will loops through every lines in a file.\r\n`tokens` are the tokens you want to take, set it to a number if you want to get the token at that position set it to `*` if you want to get all tokens, set it to `number1-number2` if you want to get the tokens start from position number1 to position number2, and to access those tokens, use paratemeters in alphabetical order.\r\n\t\r\n### Loops through a set of parameters\r\n\r\n\tscan_str[] %%parameters in (set) do (\r\n\t)\r\n\t\r\n### Loops through a folder\r\n\r\n\tscan_files[] %%parameters in (folder) do (\r\n\t)\r\n\t\r\n## While loops\r\nWhile loops can be created using:\r\n\r\n\twhile[] condition\r\n\t::code\r\n\tendwhile[]\r\n\r\nOf course, the loops will run when the condition is still true, stop when false.\r\n\r\n### Repeat-until loop\r\n\r\n\trepeat[]\r\n\t::code\r\n\tuntil[] condition\r\n\r\n### Differences between While and Repeat Until\r\nWhile loop is executed only when given condition is true. While repeat-until executes the codes first before caring about the condition, and it loops until the condition is true.\r\n\r\n### Nesting while loops\r\nThis will work just fine:\r\n\r\n\twhile[] condition\r\n\t\twhile[] condition\r\n\t\tendwhile[]\r\n\tendwhile[]\r\n\r\n<b>(Same with repeat-until)</b>\r\n\r\n## Batch's way to create whiles loops.\r\nFreakC's while loops are compiled down to goto statements and labels, so you can also create a while loop using normal Batch:\r\n\r\n\teq[] i=start_number\r\n\tlabel[] loop\r\n\tcommand\r\n\tif[] %i% == end_number goto[] nextcode\r\n\teq[] i++\r\n\tgoto[] loop\r\n\t\r\n\tlabel[] nextcode\r\n\tcommand\r\n\r\nBut this would be too bulky, just stick with FreakC's whilee loop.\r\n\t\r\nFor example, this program will print all the number from 0 to 10 then print out \"Done!\":\r\n\r\n\teq[] i=0\r\n\tlabel[] loop\r\n\tprint[] %i%\r\n\tif[] %i% == 10 goto[] nextcode\r\n\teq[] i++\r\n\tgoto[] loop\r\n\t\r\n\tlabel[] nextcode\r\n\tprint[] Done^!\r\n\r\n## FreakC's for loop\r\n\r\n\tenb_delay[]\r\n\tfor[] var_name start step end\r\n\t\t:: some code\r\n\tendfor[]\r\n\r\nWhy? Because FreakC's while loops are compiled down to labels and goto statements, which means that Batch's for will not work well with FreakC's while, unless you create a function containing that while loop, and then call it inside the Batch-style's for loop, then it would work, but that's tedious. However, FreakC's for loop is compiled down to the same format as while loops, so you can nest while and for loops together easily. Also, by using FreakC's for loop, you can gain some features which I will cover in the next section.\r\n\r\nBut there's some drawbacks, the biggest one is probably performance loss because FreakC's for is compiled down to goto statments and labels, which are way slower than Batch-styl for loops. But if you prefer convenience to performance then `for[]` is good for you, same with macros and functions lol.\r\n\r\n## Break, continue statement\r\nTo break out a FreakC's for loop or while loop, simply use `breakl[]`:\r\n\r\n\tenb_delay[]\r\n\tfor[] i 0 1 5\r\n\t\tif[] ^!i^! == 3 breakl[]\r\n\tendfor[]\r\n\t:: This will print out 1, 2\r\n\r\nTo skip one iteration, use `continue[]`:\r\n\r\n\tenb_delay[]\r\n\tfor[] i 0 1 5\r\n\t\tif[] ^!i^! == 3 continue[]\r\n\tendfor[]\r\n\t:: This will print out 1, 2, 4\r\n\r\n`continue[]` and `breakl[]` can work well with while loops and repeat-until loops.\r\n\r\n# Inlining commands\r\nNote that all commands can be inlined normally, except all FreakC-exclusive commands that uses its own kind of block statement.\r\nThese includes:\r\n* `function[]` - `endfunc[]`\r\n* `while[]` - `endwhile[]`\r\n* `repeat[]` - `until[]`\r\n* `match[]` - `endmatch[]`\r\n* `case[]` - `endcase[]`\r\n\r\n\r\nThis will not work\r\n\r\n\tfunction[] something endfunc[]\r\n\r\nor this:\r\n\r\n\tif[] 1 == 1 while[] 1 > 0\r\n\t\tprint[] OMG\r\n\tendwhile[]\r\n\r\nit should have been:\r\n\r\n\tif[] 1 == 1 (\r\n\t\twhile 1 > 0\r\n\t\t\tprint[] OMG\r\n\t\tendwhile[]\r\n\t)\r\n\r\n# Asynchronous process\r\nIn Batch, you can run a Batch file asynchronously using:\r\n\r\n\tstart /B \"\" file.bat\r\n\t\r\nthe equivalent in FreakC would be:\r\n\r\n\topen[] /B \"\" file.bat\r\n\r\nExample with functions:\r\n\r\n\tenb_delay[]\r\n\r\n\t:: asynchronous code\r\n\topen[] /b \"\" count[..] \"Dog\"\r\n\t:: synchronous code\r\n\tcount[..] \"Sheep\"\r\n\r\n\t:: Count function to print a string 10 times\r\n\tfunction[] count\r\n\t\t@echo off\r\n\t\tloop[] %%i in (1 1 10) do (\r\n\t\t\tprint[] %%i %~1\r\n\t\t\twait[] 2 >nul\r\n\t\t)\r\n\tendfunc[]\r\n\r\nYou would be able to see that it doesn't wait for 2 seconds to print out Dog and *then* Sheep, Dog and Sheep are printed at almost the same time. This is because the code is run asynchronously, it is non blocking. This helps a lot in improving performance because you can technically change \"in-order\" tasks into tasks that run together. Think of it as a bathtub, rather than making one people take a bath and then proceeds to the next one, you can just put all people into the bathtub, which should reduce a lot of time, and should scale well if given more people (who in real case, are users). Or if you are developing a videogame, the code can reacts to user's input while the game is still rendering normally.\r\n\r\n# Parentheses\r\n## An alternative\r\nBecause FreakC uses more \"human-friendly\" syntax, but Batch uses parentheses for creating blocks of codes, so I've decided to add a crappy \"human version\" of this:\r\n\r\n\tif[] 1 == 1 begin[]\r\n\t\twhile 1 > 0\r\n\t\t\tprint[] OMG\r\n\t\tendwhile[]\r\n\tdone[]\r\n\r\n`begin[]` and `done[]` are direct equivalents of `(` and `)`, so they both work the same, but if you prefer codes to be more \"human-readable\", then this would be pretty good.\r\n\r\n# Escaping characters\r\n## Escaping special characters\r\nTo escape characters like `&|><` and most other characters, you can use the caret character:\r\n\r\n\t:: Prints out \"&\"\r\n\tprint[] ^&\r\n\t:: Prints out \"|\"\r\n\tprint[] ^|\r\n\r\n### Escaping the caret character itself\r\n\r\n\tprint[] ^^\r\n\r\n## Escaping % and !\r\nWith `%`, you can just double it up to escape it. Example:\r\n\r\n\t:: Will print out \"%LOL%\"\r\n\tprint[] %%LOL%%\r\n\r\nIf you use `!` not for variables, then one caret character will do the job:\r\n\r\n\t:: Will print out \"Hello!\"\r\n\tprint[] Hello^!\r\n\t\r\nWith `!` for variables, you can add 5 caret characters:\r\n\r\n\t:: Will print out \"!Hello!\"\r\n\tvar[] hello=hello freakc\r\n\tprint[] ^^^^^!hello^^^^^!\r\n\r\n## Escaping quotation marks\r\nIf you pass in arguments for functions (or for loops) like this:\r\n\r\n\tfunc_name[..] \"Arg1\" \"Arg2\" \"Arg3 \"  \"\r\n\r\nthen there would be errors.\r\n\r\nInstead, you must double the quotes:\r\n\r\n\tfunc_name[..] \"Arg1\" \"Arg2\" \"Arg3 \"\"  \"\r\n\r\nThen just replace 2 quotes with one.\r\n\r\n# Modules and include\r\nCreate a module:\r\n\r\n\tdeny[]\r\n\t:: code goes here\r\n\r\nInclude the compiled content of the module:\r\n\r\n\tinclude[] file_with_no_fclang_extension\r\n\r\n`include[]` gives you the same effect you would get from `#include` from C/C++, but there're some differences. #include takes the code of the other file and put it in the main file and then the main file is compiled, while include[] compiles the other file first and then take that compiled codes and put it in the compiled main file.\r\n\r\nYou can also compile a file without including it:\r\n\r\n\tcompile[] file_with_no_fclang_extension\r\n\r\nThis might come in handy if you have files as functions. (Batch style)\r\n\r\n# Pre-built libraries\r\n## Float\r\n\r\n\tfloat[] \"variable_name\" \"some_value\"\r\n\r\n## List\r\n\r\n\t:: Find sum of list of numbers, seperated by a space character.\r\n\tsum[] \"variable_name\" \"list\"\r\n\t\r\n\t:: Find maximum of list, seperated by a space character.\r\n\tmax[] \"variable_name\" \"list\"\r\n\t\r\n\t:: Find minimum of list, seperated by a space character.\r\n\tmin[] \"variable_name\" \"list\"\r\n\t\r\n\t:: Example:\r\n\tmax[] \"max_num\" \"2 3 1 8 5\"\r\n\t:: This will prints out \"8\"\r\n\tprint[] %max_num%\r\n\r\n## Array\r\n\r\n\t:: Find sum of every elements in an array\r\n\tarr_sum[] \"variable_name\" \"array\" \"length\"\r\n\t\r\n\t:: Find largest element in an array\r\n\tarr_max[] \"variable_name\" \"array\" \"length\"\r\n\t\r\n\t:: Find smallest element in an array\r\n\tarr_min[] \"variable_name\" \"array\" \"length\"\r\n\t\r\n\t:: Return true if array include a value, false if not\r\n\tarr_includes[] \"variable_name\" \"value\" \"array\" \"length\"\r\n\t\r\n\t:: Find first index of an element, return -1 if find none\r\n\tarr_indexOf[] \"variable_name\" \"value\" \"array\" \"length\"\r\n\t\r\n\t:: Find last index of an element, return -1 if find none\r\n\tarr_lastIndexOf[] \"variable_name\" \"value\" \"array\" \"length\"\r\n\t\r\n\t:: Return a value which concatenated all elements in an array\r\n\tarr_join[] \"variable_name\" \"array\" \"length\"\r\n\t\r\n\t:: Find length of an array (will crash if an element is empty)\r\n\tarr_length[] \"variable_name\" \"array\"\r\n\t\r\n\t:: Reverse array\r\n\tarr_reverse[] \"array\" \"length\"\r\n\t\r\n\t:: Append a value into an array\r\n\tarr_push[] \"array\" \"value\" \"length\"\r\n\t:: But this is not really a good way to append a value into an array, you can just do this and it's way better:\r\n\tvar[] array[length+1]=value\r\n\t:: By doing this, you gain better performance, and you can have better control at the array's length:\r\n\t:: Example:\r\n\tint[] arr_len++\r\n\tvar[] arr[%len%]=5\r\n\t\r\n\t:: Prepend a value into an array (requires delayed expansion being enabled) \r\n\tarr_unshift[] \"array\" \"value\" \"length\"\r\n\t\r\n\t:: Remove the last value from an array \r\n\tarr_pop[] \"array\" \"length\"\r\n\t:: Same with arr_push[], this function is not really good, this is a better way:\r\n\tvar[] array[length]=\r\n\t:: Example:\r\n\tvar[] arr[%arr_len%]=\r\n\tint[] arr_len--\r\n\t\r\n\t:: Remove the first value from an array (requires delayed expansion being enabled) \r\n\tarr_shift[] \"array\" \"length\"\r\n\t\r\n\t:: Remove an \"amount\" value from a specified \"index\" from \"array\" \r\n\tarr_splice[] \"array\" \"index\" \"amount\"\r\n\t\r\n\t:: Fill the array from index1 to index2 with a value\r\n\tarr_fill[] \"array\" \"value\" \"index1\" \"index2\"\r\n\t:: Come to think of it, you can create a whole new array filled with some value using arr_fill with out declaration\r\n\t\r\n\t:: Sort an array using the quick sort algorithm\r\n\tarr_qsort[] \"array\" \"low\" \"high\"\r\n\t\r\n\t:: Clear an array (will crash if an element is empty)\r\n\tarr_clear[] \"array\" \"length\"\r\n\r\n\r\n\t:: Example:\r\n\tvar[] arr[0]=1\r\n\tvar[] arr[1]=0\r\n\tvar[] arr[2]=10\r\n\tarr_max[] \"max_num\" \"arr\" \"3\"\r\n\t:: This will print out \"10\"\r\n\tprint[] %max_num%\r\n\r\n### Note\r\nAll the functions above only works with list with all integers. String or floats will cause errors.\r\n\t\r\n## Math\r\n\r\n\t:: Absolute\r\n\tabs[] \"variable_name\" \"number\"\r\n\t\r\n\t:: Check if a number is odd\r\n\todd[] \"variable_name\" \"number\"\r\n\r\n\t:: Check if a number is even\r\n\teven[] \"variable_name\" \"number\r\n\r\n\t:: Power\r\n\tpow[] \"variable_name\" \"number\" \"power_num\"\r\n\t\r\n\t:: Factorial\r\n\tfactorial[] \"variable_name\" \"number\"\r\n\t\r\n## String\r\n\r\n\t:: Length of string\r\n\tstring_length[] \"variable_name\" \"string\"\r\n\t\r\n\t:: To uppercase\r\n\tstring_upper[] \"variable_name\" \"string\"\r\n\t\r\n\t:: To lowercase\r\n\tstring_lower[] \"variable_name\" \"string\"\r\n\t\r\n\t:: Reverse\r\n\tstring_reverse[] \"variable_name\" \"string\"\r\n\t\r\n\t:: First first index of a substring in a string\r\n\tstring_indexOf[] \"variable_name\" \"substring\" \"string\"\r\n\t\r\n\t:: First last index of a substring in a string\r\n\tstring_lastIndexOf[] \"variable_name\" \"substring\" \"string\"\r\n\t\r\n\t:: Trim all excess spaces from both side of a string\r\n\tstring_trim[] \"variable_name\" \"string\"\r\n\t\r\n\t:: Return true if string starts with a substring, false if it doesn't\r\n\tstring_startswith[] \"variable_name\" \"string\" \"substring\" \"position\"\r\n\t\r\n\t:: Return true if string ends with a substring, false if it doesn't\r\n\tstring_endswith[] \"variable_name\" \"string\" \"substring\" \"position\"\r\n\t\r\n\t:: Return an ASCII value equivalent to the character, if passed a string, it will return the value of the first character only, so if you pass in \"\"\"\" it will give you the ASCII value of the double quote character\r\n\tstring_ord[] \"variable_name\" \"value\"\r\n\t\r\n\t:: Return a character equivalent to its ascii value\r\n\tstring_chr[] \"variable_name\" \"value\"\r\n\t:: Note that you would probably need a caret character for escaping some special characters like \"<>&^\" like this:\r\n\tstring_chr[] \"variable_name\" \"value\"\r\n\tprint[] ^%variable_name% :: This is safe and highly recommended\r\n\r\n\t\r\n## Import keyword and generating methods\r\nFrom v0.6.1, `import[]` has been obsolete since commands can generate their own independent method files. But you can still use it if you want, it will generate a bunch of files even when you don't need them though:\r\n\r\n\t:: Will generate all method files for math\r\n\timport[] math\r\n\r\nBut I guess if you want to call files normally, you can use import for that:\r\n\r\n\timport[] math\r\n\tfclib_math_pow[..] \"some_var\" \"some_value\"\r\n\r\nBut you can use `gen_lib_func[]` which is much cleaner, and only generates the needed method:\r\n\r\n\tgen_lib_func[]\r\n\tfclib_math_pow[..] \"some_var\" \"some_value\"\r\n\r\nBut for real, why would you need to do that, just type in `pow[] \"some_var\" \"some_value\"`. It's shorter and it's basically the same thing.\r\n\t\r\n# Command-line argument\r\nYou can use %1, %2, %3,... for command-line args\r\n\r\nFor example, you have a FreakC file called \"main\" like this (which will be compiled later):\r\n\r\n\tprint[] First argument: %1\r\n\tprint[] Second argument: %2\r\n\tprint[] Third argument: %3\r\n\r\nIf you pass in the file with these arguments:\r\n\r\n\t./main Hello World and FreakC\r\n\t\r\nThen the output would be:\r\n\r\n\tFirst argument: Hello\r\n\tSecond argument: World\r\n\tThird argument: and\r\n\r\n# Statement\r\nIt's important to say that pretty much everything is a statement, not an expression. Every commands are executed, and no values are returned at all.\r\n\r\n# Error handling\r\nFirst of all, you'll need to know that the FreakC compiler will not catches errors at all, but you can still receive errors from CMD or the Batch interpreter.\r\n\r\n## Error handling\r\nYou can catch errors by using the following codes:\r\n\r\n\tcommand && (\r\n\t\techo The codes ran successfully\r\n\t) || (\r\n\t\techo Failed :(\r\n\t)\r\n\t\r\nBy using the \"and\" and \"or\" operator, we can implement error handling like above. Basically, it runs the \"command\", if there's no problem, it will execute the first block, or else it will execute the other block.\r\n\r\n# Nul in FreakC\r\nIt's just like nul in Batch, so if you want to make your console not print out any process, you can do it like this:\r\n\r\n\tCommand >nul\r\n\t\r\nTo hide errors, you can do this:\r\n\r\n\tCommand >nul 2>nul\r\n\r\n# Find strings in a file \r\nfnd[]:\r\n\r\n\tfnd[] [/V] [/C] [/N] [/I] [/OFF[LINE]] \"string\" [[drive:][path]filename[ ...]]\r\n\t\r\n\t/V         Displays all lines NOT containing the specified string.\r\n\t/C         Displays only the count of lines containing the string.\r\n\t/N         Displays line numbers with the displayed lines.\r\n\t/I         Ignores the case of characters when searching for the string.\r\n\t/OFF[LINE] Do not skip files with offline attribute set.\r\n\t\"string\"   Specifies the text string to find.\r\n\t[drive:][path]filename Specifies a file or files to search.\r\n\t\r\n\tIf a path is not specified, FIND searches the text typed at the prompt or piped from another command.\r\n\tIf a path is not specified, FIND searches the text typed at the prompt or piped from another command.\r\n\r\n\r\nfndstr[]:\r\n\r\n\tfndstr[] [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]\r\n        [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]\r\n        strings [[drive:][path]filename[ ...]]\r\n\r\n\t/B         Matches pattern if at the beginning of a line.\r\n\t/E         Matches pattern if at the end of a line.\r\n\t/L         Uses search strings literally.\r\n\t/R         Uses search strings as regular expressions.\r\n\t/S         Searches for matching files in the current directory and all subdirectories.\r\n\t/I         Specifies that the search is not to be case-sensitive.\r\n\t/X         Prints lines that match exactly.\r\n\t/V         Prints only lines that do not contain a match.\r\n\t/N         Prints the line number before each line that matches. \r\n\t/M         Prints only the filename if a file contains a match.\r\n\t/O         Prints character offset before each matching line.\r\n\t/P         Skip files with non-printable characters.\r\n\t/OFF[LINE] Do not skip files with offline attribute set.\r\n\t/A:attr    Specifies color attribute with two hex digits. See \"color /?\"\r\n\t/F:file    Reads file list from the specified file(/ stands for console).\r\n\t/C:string  Uses specified string as a literal search string.\t\r\n\t/G:file    Gets search strings from the specified file(/ stands for console).\r\n\t/D:dir     Search a semicolon delimited list of directories\r\n\tstrings    Text to be searched for.\r\n\t[drive:][path]filename Specifies a file or files to search.\r\n\t\r\n\tUse spaces to separate multiple search strings unless the argument is prefixed with /C.  \r\n\tFor example, 'FINDSTR \"hello there\" x.y' searches for \"hello\" or \"there\" in file x.y.  \r\n\t'FINDSTR /C:\"hello there\" x.y' searches for \"hello there\" in file x.y.\r\n\t\r\n\tRegular expression quick reference:\r\n\t.        Wildcard: any character\r\n\t*        Repeat: zero or more occurrences of previous character or class\r\n\t^        Line position: beginning of line\r\n\t$        Line position: end of line\r\n\t[class]  Character class: any one character in set\r\n\t[^class] Inverse class: any one character not in set\r\n\t[x-y]    Range: any characters within the specified range\r\n\t\\x       Escape: literal use of metacharacter x\r\n\t\\<xyz    Word position: beginning of word\r\n\txyz\\>    Word position: end of word\r\n\t\r\n(Copied from the documentation of Batch)\r\n\r\n# Other useful commands\r\n\r\n### Exit the program\r\n\r\n\tquit[]\r\n\t\r\n### Shutdown system\t\r\n\t\r\n\timd_shutdown[]\r\n\t::Add /t time and /c \"comment\" to set the time to shutdown and leave a comment before shutdown\r\n\t\r\n\t:: Log off\r\n\tlogoff[]\r\n\t:: Hibernate shutdown\r\n\thibernate_shutdown[]\r\n\t:: Shutdown system after a specific time (in ms)\r\n\tshutdown_after[] time\r\n\t:: Immediate shutdown\r\n\timd_shutdowns[]\r\n\t\r\n### Restart system\r\n\r\n\timd_restart[]\r\n\t::Add /t time and /c \"comment\" to set the time to shutdown and leave a comment before restart\r\n\t\r\n\t:: Restart system after a specific time (in ms)\r\n\trestart_after[] time\r\n\t\r\n### Create a folder\r\n\r\n\tcreate_dir[] folder_name\r\n\t\r\n### Access a folder\r\n\t\r\n\tchange_dir[] folder_name\r\n\t\r\n### Access a drive\r\n\t\r\n\tdrive[] drive_name\r\n\t\r\n### Read a file\r\n\r\n\tread_file[] file_name\r\n\t\r\n### Clear the screen\r\n\r\n\tclrscr[]\r\n\t\r\n### Pause\r\n\r\n\tstop[]\r\n\r\n### Delete a file\r\n\r\n\tdel[] \r\n\t\r\n### Delete a folder\r\n\t\r\n\tremove_dir[] folder_name\r\n\t\r\n### Change color, a pair of hex code is a color code\r\n\r\n\tchange_color[] hex_code\r\n\r\n* 0 = Black\r\n* 1 = Blue\r\n* 2 = Green\r\n* 3 = Aqua\r\n* 4 = Red\r\n* 5 = Purple\r\n* 6 = Yellow\r\n* 7 = White\r\n* 8 = Gray\r\n* 9 = Light Blue\r\n* A = Light Green\r\n* B = Light Aqua\r\n* C = Light Red\r\n* D = Light Purple\r\n* E = Light Yellow\r\n* F = Bright White\r\n\t\r\n### Change the title of the program\r\n\r\n\tchange_title[] title_name\r\n\t\r\n### Change console's size\r\n\r\n\tchange_mode[] size_number\r\n\tchange_mode[] con cols=columns_or_width lines=lines_or_height\r\n\t:: Shorter one\r\n\tchange_mode[] columns_or_width,lines_or_height\r\n\t\r\n### Rename a file\r\n\r\n\trename[] file_name\r\n\t\r\n### Move a file to the new path\r\n\r\n\tmov[] file_name new_path\r\n\t\r\n### Copy a file to the new path\r\n\r\n\tcopy[] file_name new_path\r\n\t\r\n### Open a file or a website url (would open cmd if nothing is opened)\r\n\r\n\topen[] file\r\n\t\r\n### Timeout for a specific time\r\n\r\n\twait[] time_as_second\r\n\r\n### Restart the program or loop the program endlessly\r\n\r\n\tinf_loop[]\r\n\t\r\n### Shows date\r\n\r\n\tsee_date[]\r\n\t\r\n### Shows time\r\n\r\n\tsee_time[]\r\n\t\r\n### Shows all files in the current directory\r\n\r\n\tls[]\r\n\r\n### Prompt for date to change date\r\n\r\n\tchange_date[]\r\n\t\r\n<b>Note: Administrator is required to run the command</b>\r\n\t\r\n### Prompt for time to change time\r\n\r\n\tchange_time[]\r\n\r\n<b>Note: Administrator is required to run the command</b>\r\n\t\r\n### Open powershell\r\n\r\n\tps[]\r\n\r\n# Clear codes\r\nYou can clear all compiled code using:\r\n\r\n\tdeny[]\r\n\t\r\n# Multiple colors\r\nSince everything works fine in Batch works in FreakC, you can check this [link](https://gist.githubusercontent.com/mlocati/fdabcaeb8071d5c75a2d51712db24011/raw/b710612d6320df7e146508094e84b92b34c77d48/win10colors.cmd) out.\r\n\r\n# Convert FreakC to .EXE files\r\nIn \"[FreakC/Utilities/Scripts](Utilities/Scripts)\" there is a file called \"[battoexe.bat](Utilities/Scripts/battoexe.bat)\" which helps you to convert .bat files to .exe files.\r\n\r\nSo to convert FreakC to .EXE files, you need to compile FreakC codes to Batch, and then convert the Batch file generated by simply dragging that Batch file onto battoexe.bat.\r\n\r\nYou can actually find plenty of other tools online that helps you to converts Batch files to EXE files.\r\n\r\n# Notes\r\nFreakC is case-sensitive only with commands with [], other stuffs aren't.\r\n\r\nMost of the commands are just modified Batch commands, so you can actually apply Batch logic in it.\r\n\r\nFunny fact, you can print \"Hello, World\" using:\r\n\r\n\thello_world[]\r\n"
  },
  {
    "path": "Utilities/Scripts/FreakC/freakc.tmLanguage",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\r\n<plist version=\"1.0\">\r\n<dict>\r\n  <key>fileTypes</key>\r\n  <array>\r\n    <string>fclang</string>\r\n  </array>\r\n  <key>name</key>\r\n  <string>FreakC</string>\r\n  <key>patterns</key>\r\n  <array>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>::.*$|h\\[\\].*$|\\!\\=.*\\=\\!</string>\r\n      <key>name</key>\r\n      <string>comment.line</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>(?&#60;=(function\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(label\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(class\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(method\\[\\] ))([A-Za-z_])\\w+</string>\r\n      <key>name</key>\r\n      <string>entity.name.function</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>([A-Za-z])\\w+(?=\\[\\.\\.\\])|([A-Za-z])\\w+(?=\\[\\:\\:\\])|(?&#60;=(call\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(^))([a-zA-Z_])+(?=(\\.([A-Za-z_]+)\\[\\.\\.\\]))|(?&#60;=(icall\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(new\\[\\] ))([A-Za-z_])\\w+|(?&#60;=(goto\\[\\] ))([A-Za-z_])\\w+</string>\r\n      <key>name</key>\r\n      <string>support.function</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>(%~1)+(?=(.[A-Za-z_])+)|\\$this</string>\r\n      <key>name</key>\r\n      <string>variable.language</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>%%%%~([0-9])+|%%%~([0-9])+|%%~([0-9])+|%~([0-9])+</string>\r\n      <key>name</key>\r\n      <string>variable.parameter.function</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>=|\\+|-|\\*|/|\\+\\+|--</string>\r\n      <key>name</key>\r\n      <string>keyword.operator</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>([A-Za-z])\\w+(?=\\[\\])</string>\r\n      <key>name</key>\r\n      <string>support.constant</string>\r\n    </dict>\r\n    <dict>\r\n      <key>match</key>\r\n      <string>\".*\"</string>\r\n      <key>name</key>\r\n      <string>string.quoted.double</string>\r\n    </dict>\r\n  </array>\r\n  <key>scopeName</key>\r\n  <string>source.fclang</string>\r\n  <key>uuid</key>\r\n  <string>6f5f460e-5ab0-4ce2-8cb7-0cafea6c46c9</string>\r\n</dict>\r\n</plist>"
  },
  {
    "path": "Utilities/Scripts/FreakC.sublime-build",
    "content": "{\r\n\t\"cmd\": [\"FreakC\",\"$file\"]\r\n}\r\n"
  },
  {
    "path": "Utilities/Scripts/battoexe.bat",
    "content": "@echo off\r\ntitle Convert BAT to EXE\r\nmode 75,3 & color 0A\r\necho(\r\nset \"target.exe=%__cd__%%~n1.exe\"\r\nset \"batch_file=%~f1\"\r\nset \"bat_name=%~nx1\"\r\nset \"bat_dir=%~dp1\"\r\nSet \"sed=%temp%\\2exe.sed\"\r\ncopy /y \"%~f0\" \"%sed%\" >nul\r\n(\r\n    (echo()\r\n    (echo(AppLaunched=cmd /c \"%bat_name%\")\r\n    (echo(TargetName=%target.exe%)\r\n    (echo(FILE0=\"%bat_name%\")\r\n    (echo([SourceFiles])\r\n    (echo(SourceFiles0=%bat_dir%)\r\n    (echo([SourceFiles0])\r\n    (echo(%%FILE0%%=)\r\n)>>\"%sed%\"\r\n\r\niexpress /n /q /m %sed%\r\ndel /q /f \"%sed%\"\r\nexit /b 0\r\n\r\n[Version]\r\nClass=IEXPRESS\r\nSEDVersion=3\r\n[Options]\r\nPackagePurpose=InstallApp\r\nShowInstallProgramWindow=0\r\nHideExtractAnimation=1\r\nUseLongFileName=1\r\nInsideCompressed=0\r\nCAB_FixedSize=0\r\nCAB_ResvCodeSigning=0\r\nRebootMode=N\r\nInstallPrompt=%InstallPrompt%\r\nDisplayLicense=%DisplayLicense%\r\nFinishMessage=%FinishMessage%\r\nTargetName=%TargetName%\r\nFriendlyName=%FriendlyName%\r\nAppLaunched=%AppLaunched%\r\nPostInstallCmd=%PostInstallCmd%\r\nAdminQuietInstCmd=%AdminQuietInstCmd%\r\nUserQuietInstCmd=%UserQuietInstCmd%\r\nSourceFiles=SourceFiles\r\n\r\n[Strings]\r\nInstallPrompt=\r\nDisplayLicense=\r\nFinishMessage=\r\nFriendlyName=-\r\nPostInstallCmd=<None>\r\nAdminQuietInstCmd="
  }
]