Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

algo-lang

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algo-lang - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

build/lexer.js

@@ -48,4 +48,4 @@ 'use strict';

this.registerRule('"', this.lex_24, 'default');
this.registerRule(new RegExp('-?[0-9]+'), this.lex_25, 'default');
this.registerRule(new RegExp('-?[0-9]*\\.[0-9]+'), this.lex_26, 'default');
this.registerRule(new RegExp('[0-9]+'), this.lex_25, 'default');
this.registerRule(new RegExp('[0-9]*\\.[0-9]+'), this.lex_26, 'default');
this.registerRule(new RegExp('\'(.)\''), this.lex_27, 'default');

@@ -52,0 +52,0 @@ this.registerRule('\'\\n\'', this.lex_28, 'default');

@@ -36,2 +36,4 @@ 'use strict';

this.registerCode("const_decls_list", 1, this.const_decls_list1);
this.registerCode("const_decls_list", 2, this.const_decls_list2);
this.registerCode("const_decls_list", 3, this.const_decls_list3);
this.registerCode("types_decls", 0, this.types_decls0);

@@ -60,2 +62,6 @@ this.registerCode("types_decls", 1, this.types_decls1);

this.registerCode("value", 4, this.value4);
this.registerCode("value", 5, this.value5);
this.registerCode("value", 6, this.value6);
this.registerCode("value", 7, this.value7);
this.registerCode("value", 8, this.value8);
this.registerCode("routines_decls", 0, this.routines_decls0);

@@ -153,2 +159,8 @@ this.registerCode("routines_decls", 1, this.routines_decls1);

}
const_decls_list2(__arg_1__, __arg_2__, __arg_3__, __arg_4__, __arg_5__) {
return [new ast.Const(__arg_1__.location, __arg_1__.value, -new ast.Value(__arg_3__.location, 'entier', __arg_3__.value))];
}
const_decls_list3(__arg_1__, __arg_2__, __arg_3__, __arg_4__, __arg_5__) {
return [new ast.Const(__arg_1__.location, __arg_1__.value, -new ast.Value(__arg_3__.location, 'reel', __arg_3__.value))];
}
types_decls0(__arg_1__, __arg_2__, __arg_3__) {

@@ -211,12 +223,24 @@ return __arg_3__.value;

}
value1(__arg_1__) {
value1(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'entier', __arg_2__.value);
}
value2(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'entier', -__arg_2__.value);
}
value3(__arg_1__) {
return new ast.Value(__arg_1__.location, 'reel', __arg_1__.value);
}
value2(__arg_1__) {
value4(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'reel', __arg_2__.value);
}
value5(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'reel', -__arg_2__.value);
}
value6(__arg_1__) {
return new ast.Value(__arg_1__.location, 'chaine', __arg_1__.value);
}
value3(__arg_1__) {
value7(__arg_1__) {
return new ast.Value(__arg_1__.location, 'caractere', __arg_1__.value);
}
value4(__arg_1__) {
value8(__arg_1__) {
return new ast.Value(__arg_1__.location, '!nul');

@@ -223,0 +247,0 @@ }

@@ -242,2 +242,5 @@ 'use strict';

const end = pour.end.accept(this).value + (pour.desc ? -1 : 1);
if (!pour.desc && start >= end || pour.desc && start <= end) return;
const incr = pour.desc ? -1 : 1;

@@ -244,0 +247,0 @@ for (ref.value = start; !this.routine.returnValue && ref.value !== end; ref.value += incr) {

@@ -433,2 +433,4 @@ 'use strict';

if (!(pointer.pointer.resType instanceof ast.Pointer)) throw new _error.JungleError('Impossible de déréférencer un type qui n\'est pas un pointeur');
pointer.resType = pointer.pointer.resType.pointOn;

@@ -435,0 +437,0 @@ pointer.writable = true;

@@ -35,4 +35,4 @@ import * as ast from "./ast"

this.registerRule('"', this.lex_24, 'default')
this.registerRule(new RegExp('-?[0-9]+'), this.lex_25, 'default')
this.registerRule(new RegExp('-?[0-9]*\\.[0-9]+'), this.lex_26, 'default')
this.registerRule(new RegExp('[0-9]+'), this.lex_25, 'default')
this.registerRule(new RegExp('[0-9]*\\.[0-9]+'), this.lex_26, 'default')
this.registerRule(new RegExp('\'(.)\''), this.lex_27, 'default')

@@ -39,0 +39,0 @@ this.registerRule('\'\\n\'', this.lex_28, 'default')

@@ -18,2 +18,4 @@ import * as ast from "./ast"

this.registerCode("const_decls_list", 1, this.const_decls_list1);
this.registerCode("const_decls_list", 2, this.const_decls_list2);
this.registerCode("const_decls_list", 3, this.const_decls_list3);
this.registerCode("types_decls", 0, this.types_decls0);

@@ -42,2 +44,6 @@ this.registerCode("types_decls", 1, this.types_decls1);

this.registerCode("value", 4, this.value4);
this.registerCode("value", 5, this.value5);
this.registerCode("value", 6, this.value6);
this.registerCode("value", 7, this.value7);
this.registerCode("value", 8, this.value8);
this.registerCode("routines_decls", 0, this.routines_decls0);

@@ -136,2 +142,8 @@ this.registerCode("routines_decls", 1, this.routines_decls1);

}
const_decls_list2(__arg_1__, __arg_2__, __arg_3__, __arg_4__, __arg_5__) {
return [new ast.Const(__arg_1__.location, __arg_1__.value, -new ast.Value(__arg_3__.location, 'entier', __arg_3__.value))];
}
const_decls_list3(__arg_1__, __arg_2__, __arg_3__, __arg_4__, __arg_5__) {
return [new ast.Const(__arg_1__.location, __arg_1__.value, -new ast.Value(__arg_3__.location, 'reel', __arg_3__.value))];
}
types_decls0(__arg_1__, __arg_2__, __arg_3__) {

@@ -194,12 +206,24 @@ return __arg_3__.value;

}
value1(__arg_1__) {
value1(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'entier', __arg_2__.value);
}
value2(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'entier', -__arg_2__.value);
}
value3(__arg_1__) {
return new ast.Value(__arg_1__.location, 'reel', __arg_1__.value)
}
value2(__arg_1__) {
value4(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'reel', __arg_2__.value);
}
value5(__arg_1__, __arg_2__) {
return new ast.Value(__arg_1__.location, 'reel', -__arg_2__.value);
}
value6(__arg_1__) {
return new ast.Value(__arg_1__.location, 'chaine', __arg_1__.value)
}
value3(__arg_1__) {
value7(__arg_1__) {
return new ast.Value(__arg_1__.location, 'caractere', __arg_1__.value)
}
value4(__arg_1__) {
value8(__arg_1__) {
return new ast.Value(__arg_1__.location, '!nul')

@@ -206,0 +230,0 @@ }

@@ -252,2 +252,6 @@ import {EmptyVisitor} from './empty.js'

const end = pour.end.accept(this).value + (pour.desc ? -1 : 1)
if (!pour.desc && start >= end || pour.desc && start <= end)
return;
const incr = pour.desc ? -1 : 1

@@ -254,0 +258,0 @@ for (ref.value = start; !this.routine.returnValue && ref.value !== end; ref.value += incr) {

@@ -464,2 +464,5 @@ import {EmptyVisitor} from './empty.js'

if (!(pointer.pointer.resType instanceof ast.Pointer))
throw new JungleError('Impossible de déréférencer un type qui n\'est pas un pointeur')
pointer.resType = pointer.pointer.resType.pointOn

@@ -466,0 +469,0 @@ pointer.writable = true

{
"name": "algo-lang",
"version": "1.1.0",
"version": "1.1.1",
"description": "Algorithmic language interpreter (in French only for now)",

@@ -5,0 +5,0 @@ "homepage": "https://bitbucket.org/lsystems/algo-lang/overview",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc