https://github.com/tanay-pingalkar/productive-script
An interpreter for productivity flexibility and many more
https://github.com/tanay-pingalkar/productive-script
javascript language programming-language typescript
Last synced: 7 months ago
JSON representation
An interpreter for productivity flexibility and many more
- Host: GitHub
- URL: https://github.com/tanay-pingalkar/productive-script
- Owner: tanay-pingalkar
- License: mit
- Created: 2021-02-23T12:54:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-07T13:19:51.000Z (over 4 years ago)
- Last Synced: 2025-01-29T16:08:14.721Z (12 months ago)
- Topics: javascript, language, programming-language, typescript
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# productive-script
[abandoned/deprecated]
## installation
not realeased yet,
so you have to clone the repo
typescript needed to be install globally
```
npm i typescript -g
```
```
gh repo clone tanay-pingalkar/productive-script
```
and then
```
npm i
```
then
```
npm run watch
```
in another terminal
```
npm start / npm run dev
```
it will ask for
```
file name :-
```
type `hello`
and enter
you will see
```javascript
reading..
file is ready!
OUTPUT:
hello world
```
it means that you have productive-script working on your machine
## learn
### simple hello world
create a file in the in repo's dir with the extention .pds
and type following
```javascript
*pt("hello world")
```
you will see hello world printed below the output
like this
```javascript
reading..
file is ready!
OUTPUT:
hello world
```
`*pt()`is a language function to print variables or any kind of data.
### declare variable
```javascript
#int num="number"
```
will throw error like this, because you cannot assign a string to a number
```
cant assign "number" to number
the error has occure on line 1
```
Corection
```javascript
#int num=55
*pt(num)
```
this will print number 55. You can similarly declare string but with different prefix.
```javascript
#str helloString="hello world"
*pt(helloString)
```
## identifiers
as you can see to declare variables we are using different prefix but did you notice that there is something common in `#int` and `#str`. You guess it! the `#`
is common. `#` is an identifier. there is another identifier called `$` to declare a constant variable. And `*` identifies that this is an language function.
## expression
```javascript
#int expre=1+2/3*6
*pt(expre)
```
guess the output..