Skip to content

jdaroesti/lenguaje-de-programacion-platzi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lenguaje de programación Platzi

Source code for the Interpreters course at Platzi.

Install dependencies

  1. Create a virtual environment:
python3.8 -m venv venv
  1. Activate the virtual environment:
source venv/bin/activate
  1. Install dependencies
pip3 install -r requirements.txt

Run type checker and test suite

To run the type checker and and the test suite run the following command from the root directory.

mypy . && nosetests

Run the interpreter

python3.8 main.py

A sneak peak of the language

Bienvenido al Lenguaje de Programación Platzi.
Escribe un oración para comenzar.
>> variable a = 5;
>> variable b = 10;
>> a + b;
15
>> variable mayor_de_edad = procedimiento(edad) { 
        si(edad > 18) { 
            regresa verdadero;
        } si_no {
            regresa falso;
        }
    };
>> mayor_de_edad(20);
verdadero
>> mayor_de_edad(15);
falso
>> variable sumador = procedimiento(x) {
       regresa procedimiento(y) {
           regresa x + y;
       };
   };
>> variable suma_dos = sumador(2);
>> suma_dos(5);
7
>> variable suma_cinco = sumador(5);
>> suma_cinco(20);
25
>> mayor_de_edad(suma_cinco(20));
verdadero

About

Código fuente del Curso de Creación de Intérpretes en Platzi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages