Comparing version 1.0.3 to 1.0.4
@@ -31,3 +31,3 @@ 'use strict'; | ||
if (params.value === 0) return; | ||
if (!(params[0].value in executor.heap)) throw new Error('Segmentation fault'); | ||
if (!(params[0].value in executor.heap)) throw new _error.JungleError('Segmentation fault'); | ||
delete executor.heap[params[0].value]; | ||
@@ -34,0 +34,0 @@ params[0].value = 0; |
@@ -350,4 +350,4 @@ 'use strict'; | ||
case '←': | ||
if (!binary.left.writable) throw binary.location, new _error.JungleError('Impossible d\'assigner une valeur dans une expression non assignable de type ' + binary.left.resType.name); | ||
if (binary.left.resType !== binary.right.resType && binary.right.resType.name !== '!null' && !(binary.left.resType instanceof ast.Pointer)) throw binary.location, new _error.JungleError('Impossible d\'assigner une valeur de type ' + binary.right.resType.name + ' dans une expression de type ' + binary.left.resType.name); | ||
if (!binary.left.writable) throw new _error.JungleError('Impossible d\'assigner une valeur dans une expression non assignable de type ' + binary.left.resType.name); | ||
if (binary.left.resType !== binary.right.resType && binary.right.resType.name !== '!null' && !(binary.left.resType instanceof ast.Pointer)) throw new _error.JungleError('Impossible d\'assigner une valeur de type ' + binary.right.resType.name + ' dans une expression de type ' + binary.left.resType.name); | ||
binary.resType = this.scopes.getType('<no value>'); | ||
@@ -354,0 +354,0 @@ return; |
@@ -24,3 +24,3 @@ import * as ast from '../ast' | ||
if (!(params[0].value in executor.heap)) | ||
throw new Error('Segmentation fault') | ||
throw new JungleError('Segmentation fault') | ||
delete executor.heap[params[0].value] | ||
@@ -27,0 +27,0 @@ params[0].value = 0 |
@@ -366,5 +366,5 @@ import {EmptyVisitor} from './empty.js' | ||
if (!binary.left.writable) | ||
throw binary.location, new JungleError('Impossible d\'assigner une valeur dans une expression non assignable de type ' + binary.left.resType.name) | ||
throw new JungleError('Impossible d\'assigner une valeur dans une expression non assignable de type ' + binary.left.resType.name) | ||
if (binary.left.resType !== binary.right.resType && binary.right.resType.name !== '!null' && !(binary.left.resType instanceof ast.Pointer)) | ||
throw binary.location, new JungleError('Impossible d\'assigner une valeur de type ' + binary.right.resType.name + ' dans une expression de type ' + binary.left.resType.name) | ||
throw new JungleError('Impossible d\'assigner une valeur de type ' + binary.right.resType.name + ' dans une expression de type ' + binary.left.resType.name) | ||
binary.resType = this.scopes.getType('<no value>') | ||
@@ -371,0 +371,0 @@ return |
{ | ||
"name": "algo-lang", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
488643