Skip to content

Commit

Permalink
Merge development into main
Browse files Browse the repository at this point in the history
Merge pull request #2 from iiPythonx/devel
  • Loading branch information
iiPythonx authored Mar 28, 2023
2 parents ae291c2 + 35ffaeb commit 586f24c
Show file tree
Hide file tree
Showing 776 changed files with 496 additions and 237,487 deletions.
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Hide cache
__pycache__/

# Pyinstaller build files
dist/
build/
*.spec

# Installer data
package.zip
.installer_cache

# Hide x2 testing files
*.x2
*.xpp
36 changes: 0 additions & 36 deletions main.py

This file was deleted.

1 change: 0 additions & 1 deletion main.x2

This file was deleted.

10 changes: 6 additions & 4 deletions main.xpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var woah "hello world"
:: starting from 0
prt (chr woah 2) (chr woah 8)
prt (chr woah 2 8)
var y 1
rep 5 loop y ?y
prt y

:loop x
ret (add x 1)
8 changes: 4 additions & 4 deletions md/documents.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [x2](../README.md) / Documents
# [x++](../README.md) / Documents

## Table of Contents

Expand All @@ -21,9 +21,9 @@

## About

Welcome to the documents page of the official x2 documentation. In this section, you will be learning about the individual components that make up x2.
Welcome to the documents page of the official x++ documentation. In this section, you will be learning about the individual components that make up x++.

If you are looking for a beginner's guide for x2, check out the [tutorials](./tutorials.md) instead.
If you are looking for a beginner's guide for x++, check out the [tutorials](./tutorials.md) instead.

## Documents

Expand All @@ -40,4 +40,4 @@ If you are looking for a beginner's guide for x2, check out the [tutorials](./tu

Last Updated: February 6th, 2022 by Dm123321_31mD

[↑ Go To Top](#x2--documents)
[↑ Go To Top](#x--documents)
4 changes: 2 additions & 2 deletions md/documents/comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [x2](../../README.md) / [Documents](../documents.md) / Comments
# [x++](../../README.md) / [Documents](../documents.md) / Comments

## Table of Contents

Expand Down Expand Up @@ -37,4 +37,4 @@ out 5 :: This is a comment

Last Updated: February 6th, 2022 by Dm123321_31mD

[↑ Go To Top](#x2--documents--comments)
[↑ Go To Top](#x--documents--comments)
8 changes: 4 additions & 4 deletions md/documents/comparators.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [x2](../../README.md) / [Documents](../documents.md) / Comparators
# [x++](../../README.md) / [Documents](../documents.md) / Comparators

## Table of Contents

Expand Down Expand Up @@ -55,9 +55,9 @@

## About

Comparators are symbols or keywords that compare two different variables or values and trigger a branch in the x2 thread. Each comparator has its functionality.
Comparators are symbols or keywords that compare two different variables or values and trigger a branch in the x++ thread. Each comparator has its functionality.

Expressions are segments in the code that creates a branch in the x2 thread. They are always made up of three components: the `source`, the `comparator`, and the `target`, and they are arranged like so:
Expressions are segments in the code that creates a branch in the x++ thread. They are always made up of three components: the `source`, the `comparator`, and the `target`, and they are arranged like so:

```xt
<source> <comparator> <target>
Expand Down Expand Up @@ -302,4 +302,4 @@ cmp 5 from int "out \"true\""

Last Updated: February 6th, 2022 by Dm123321_31mD

[↑ Go To Top](#x2--documents--comparators)
[↑ Go To Top](#x--documents--comparators)
8 changes: 4 additions & 4 deletions md/documents/configurations.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [x2](../../README.md) / [Documents](../documents.md) / Configurations
# [x++](../../README.md) / [Documents](../documents.md) / Configurations

## Table of Contents

Expand Down Expand Up @@ -62,9 +62,9 @@ The configuration file can also contain non-essential information, such as the a
"contributors": [
"contributor A", "contributor B"
],
"description": "This is my x2 project",
"description": "This is my x++ project",
"main": "main.xt",
"name": "my-x2-project",
"name": "my-x++-project",
"version": "1.0.0"
}
```
Expand Down Expand Up @@ -105,4 +105,4 @@ Throws errors silently.

Last Updated: February 6th, 2022 by Dm123321_31mD

[↑ Go To Top](#x2--documents--configurations)
[↑ Go To Top](#x--documents--configurations)
18 changes: 9 additions & 9 deletions md/documents/dataTypes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [x2](../../README.md) / [Documents](../documents.md) / Data Types
# [x++](../../README.md) / [Documents](../documents.md) / Data Types

## Table of Contents

Expand Down Expand Up @@ -50,9 +50,9 @@

Data types are classifications of variables or values. Each data type can only store a specific type of value. For example, a string cannot contain an integer value, or a boolean cannot contain a string value.

Because x2 is a dynamic programming language, you can change the data type of a variable or a value during run-time.
Because x++ is a dynamic programming language, you can change the data type of a variable or a value during run-time.

x2 is also a weakly-typed programming language. You do not (and cannot) directly specify what the data type of a variable or value is. The interpreter will read the value and determine the data type during run-time.
x++ is also a weakly-typed programming language. You do not (and cannot) directly specify what the data type of a variable or value is. The interpreter will read the value and determine the data type during run-time.

Strongly-typed language, such as [Java](https://en.wikipedia.org/wiki/Java_(programming_language)):

Expand All @@ -66,7 +66,7 @@ Weakly-typed language, such as [JavaScript](https://en.wikipedia.org/wiki/JavaSc
let myInteger = 5;
```

Similarly, in x2, you define a variable with a data type of an integer like so:
Similarly, in x++, you define a variable with a data type of an integer like so:

```xt
psh 5 myInteger
Expand All @@ -78,7 +78,7 @@ psh 5 myInteger

A boolean value represents either `true` or `false`.

Currently, it is impossible to get a boolean value within vanilla x2. Because of that, integers are used instead to represent a true or false value, where `1` represents `true` and `0` represents `false`.
Currently, it is impossible to get a boolean value within vanilla x++. Because of that, integers are used instead to represent a true or false value, where `1` represents `true` and `0` represents `false`.

---

Expand Down Expand Up @@ -130,7 +130,7 @@ psh 05 myInteger
out myInteger
```

In vanilla x2, it can also be used as a boolean value, where `1` represents `true` and `0` represents `false`:
In vanilla x++, it can also be used as a boolean value, where `1` represents `true` and `0` represents `false`:

```xt
psh 0 hamburgerIsEaten
Expand All @@ -143,7 +143,7 @@ evl hamburgerIsEaten == 1 "out \"Someone ate my hamburger\""

Null is a data type that represents nothing.

It cannot be defined normally in x2 and acts as the default value to undefined variables:
It cannot be defined normally in x++ and acts as the default value to undefined variables:

```xt
out nonexistingVariable
Expand Down Expand Up @@ -207,7 +207,7 @@ Below is a list of all the escape codes for reference:

> Source: [Python DS - Python 3 Escape Sequences](https://www.python-ds.com/python-3-escape-sequences)
You can also string interpolation within an x2 string. All string interpolations must be a valid x2 statement and be surrounded by `$()`:
You can also string interpolation within an x++ string. All string interpolations must be a valid x++ statement and be surrounded by `$()`:

```xt
psh 5 myInteger
Expand All @@ -226,4 +226,4 @@ cmp "abc" < "cba" "out \"true\""

Last Updated: February 6th, 2022 by Dm123321_31mD

[↑ Go To Top](#x2--documents--data-types)
[↑ Go To Top](#x--documents--data-types)
Loading

0 comments on commit 586f24c

Please sign in to comment.