<commit_before># MY-BASIC Code Editor (Unity)

**Copyright (C) 2017 [<NAME>](https://cn.linkedin.com/in/wang-renxin-02049443). All rights reserved.**

## Introduction

This is a code editor for [MY-BASIC](https://github.com/paladin-t/my_basic) powered by the Unity3D engine.

![](docs/run.png)

It supports code manipulating, interpreter interacting, and future customization. I used the MY-BASIC DLL for Windows, and Bundle for macOS as demonstration. You can build plugin for other platforms as you wish, or use other interpreters. See the link for more information about [MY-BASIC](https://github.com/paladin-t/my_basic).

Note this repository doesn't contain any extended libraries of MY-BASIC or other playable stuffs. It's just a small reusable code editor/shell.

## Configuration

You can configure keywords, reserved words, symbols, opcodes, etc. as well as in which colors to represent them.

The editor also allows to configure how many lines of code is expected to represent, assuming taking full height of the screen.

![](docs/config.png)

It's also able to add new function words for coloring as follow.

~~~~~~~~~~cs
MyCodeEditor editor = ???
...
editor.AddFunction("???");
~~~~~~~~~~

## How to use the editor

Execute the `bin/my_basic_code_editor_unity.exe` to run the editor.

* Click a line to input code

![](docs/edit.png)

* Select some lines, then make insertion and deletion by click the buttons

![](docs/curd.png)

* Click the `RUN` button to run the code top down
* Click the `STEP` button to run the code step by step
* Click the `PAUSE` button to pause a top down execution
* Click the `STOP` button to terminate an execution

![](docs/exe.png)

* Select a file slot to save and load

![](docs/file.png)

## How to use the library<commit_msg>*updated the readme.<commit_after># MY-BASIC Code Editor (Unity)

**Copyright (C) 2017 [<NAME>](https://cn.linkedin.com/in/wang-renxin-02049443). All rights reserved.**

## Introduction

This is a code editor for [MY-BASIC](https://github.com/paladin-t/my_basic) powered by the Unity3D engine.

![](docs/run.png)

It supports code manipulating, interpreter interacting, and future customization. I used the MY-BASIC DLL for Windows, and Bundle for macOS as demonstration. You can build plugin for other platforms as you wish, or use other interpreters. See the link for more information about [MY-BASIC](https://github.com/paladin-t/my_basic).

Note this repository doesn't contain any extended libraries of MY-BASIC or other playable stuffs. It's just a small reusable code editor/shell.

## Configuration

You can configure keywords, reserved words, symbols, opcodes, etc. as well as in which colors to represent them.

The editor also allows to configure how many lines of code is expected to represent, assuming taking full height of the screen.

![](docs/config.png)

It's also able to add new function words for coloring as follow.

~~~~~~~~~~cs
MyCodeEditor editor = ???
...
editor.AddFunction("???");
~~~~~~~~~~

## How to use the editor

Execute the `bin/my_basic_code_editor_unity.exe` to run the editor.

* Click a line to input code

![](docs/edit.png)

* Select a file slot to save and load

![](docs/file.png)

* Select some lines, then make insertion and deletion by clicking the buttons

![](docs/curd.png)

* Click the `RUN` button to run the code top down
* Click the `STEP` button to run the code step by step
* Click the `PAUSE` button to pause a top down execution
* Click the `STOP` button to terminate an execution

![](docs/exe.png)

## How to use the library
{'fraction_non_alphanumeric': 0.10573678290213723, 'fraction_numerical': 0.007311586051743532, 'mean_word_length': 4.356927710843373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1706207', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1002, 'n_words': 471}