Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
867d6c03
Commit
867d6c03
authored
May 12, 2015
by
daarond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes from Neil's comments
parent
b551afee
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
16 deletions
+14
-16
generators/php.js
generators/php.js
+6
-8
generators/php/colour.js
generators/php/colour.js
+1
-1
generators/php/lists.js
generators/php/lists.js
+1
-1
generators/php/logic.js
generators/php/logic.js
+1
-1
generators/php/loops.js
generators/php/loops.js
+1
-1
generators/php/math.js
generators/php/math.js
+1
-1
generators/php/procedures.js
generators/php/procedures.js
+1
-1
generators/php/text.js
generators/php/text.js
+1
-1
generators/php/variables.js
generators/php/variables.js
+1
-1
No files found.
generators/php.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -43,7 +43,6 @@ Blockly.PHP = new Blockly.Generator('PHP');
...
@@ -43,7 +43,6 @@ Blockly.PHP = new Blockly.Generator('PHP');
* @private
* @private
*/
*/
Blockly
.
PHP
.
addReservedWords
(
Blockly
.
PHP
.
addReservedWords
(
'
Blockly,
'
+
// In case JS is evaled in the current window.
// http://php.net/manual/en/reserved.keywords.php
// http://php.net/manual/en/reserved.keywords.php
'
__halt_compiler,abstract,and,array,as,break,callable,case,catch,class,clone,const,continue,declare,default,die,do,echo,else,elseif,empty,enddeclare,endfor,endforeach,endif,endswitch,endwhile,eval,exit,extends,final,for,foreach,function,global,goto,if,implements,include,include_once,instanceof,insteadof,interface,isset,list,namespace,new,or,print,private,protected,public,require,require_once,return,static,switch,throw,trait,try,unset,use,var,while,xor,
'
+
'
__halt_compiler,abstract,and,array,as,break,callable,case,catch,class,clone,const,continue,declare,default,die,do,echo,else,elseif,empty,enddeclare,endfor,endforeach,endif,endswitch,endwhile,eval,exit,extends,final,for,foreach,function,global,goto,if,implements,include,include_once,instanceof,insteadof,interface,isset,list,namespace,new,or,print,private,protected,public,require,require_once,return,static,switch,throw,trait,try,unset,use,var,while,xor,
'
+
// http://php.net/manual/en/reserved.constants.php
// http://php.net/manual/en/reserved.constants.php
...
@@ -51,7 +50,7 @@ Blockly.PHP.addReservedWords(
...
@@ -51,7 +50,7 @@ Blockly.PHP.addReservedWords(
/**
/**
* Order of operation ENUMs.
* Order of operation ENUMs.
* http
s://developer.mozilla.org/en/PHP/Reference/Operators/Operator_Precedence
* http
://php.net/manual/en/language.operators.precedence.php
*/
*/
Blockly
.
PHP
.
ORDER_ATOMIC
=
0
;
// 0 "" ...
Blockly
.
PHP
.
ORDER_ATOMIC
=
0
;
// 0 "" ...
Blockly
.
PHP
.
ORDER_CLONE
=
1
;
// clone
Blockly
.
PHP
.
ORDER_CLONE
=
1
;
// clone
...
@@ -64,9 +63,6 @@ Blockly.PHP.ORDER_LOGICAL_NOT = 4; // !
...
@@ -64,9 +63,6 @@ Blockly.PHP.ORDER_LOGICAL_NOT = 4; // !
Blockly
.
PHP
.
ORDER_BITWISE_NOT
=
4
;
// ~
Blockly
.
PHP
.
ORDER_BITWISE_NOT
=
4
;
// ~
Blockly
.
PHP
.
ORDER_UNARY_PLUS
=
4
;
// +
Blockly
.
PHP
.
ORDER_UNARY_PLUS
=
4
;
// +
Blockly
.
PHP
.
ORDER_UNARY_NEGATION
=
4
;
// -
Blockly
.
PHP
.
ORDER_UNARY_NEGATION
=
4
;
// -
Blockly
.
PHP
.
ORDER_TYPEOF
=
4
;
// typeof
Blockly
.
PHP
.
ORDER_VOID
=
4
;
// void
Blockly
.
PHP
.
ORDER_DELETE
=
4
;
// delete
Blockly
.
PHP
.
ORDER_MULTIPLICATION
=
5
;
// *
Blockly
.
PHP
.
ORDER_MULTIPLICATION
=
5
;
// *
Blockly
.
PHP
.
ORDER_DIVISION
=
5
;
// /
Blockly
.
PHP
.
ORDER_DIVISION
=
5
;
// /
Blockly
.
PHP
.
ORDER_MODULUS
=
5
;
// %
Blockly
.
PHP
.
ORDER_MODULUS
=
5
;
// %
...
@@ -116,8 +112,10 @@ Blockly.PHP.getDistinctName = function(name, type) {
...
@@ -116,8 +112,10 @@ Blockly.PHP.getDistinctName = function(name, type) {
}
}
safeName
+=
i
;
safeName
+=
i
;
this
.
variableDB_
.
dbReverse_
[
safeName
]
=
true
;
this
.
variableDB_
.
dbReverse_
[
safeName
]
=
true
;
if
(
type
===
Blockly
.
Procedures
.
NAME_TYPE
)
return
safeName
;
if
(
type
==
Blockly
.
Variables
.
NAME_TYPE
)
{
return
'
$
'
+
safeName
;
safeName
=
'
$
'
+
safeName
;
}
return
safeName
;
};
};
Blockly
.
PHP
.
getName
=
function
(
name
,
type
)
{
Blockly
.
PHP
.
getName
=
function
(
name
,
type
)
{
...
...
generators/php/colour.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/lists.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/logic.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/loops.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/math.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/procedures.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/text.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
generators/php/variables.js
View file @
867d6c03
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @license
* @license
* Visual Blocks Language
* Visual Blocks Language
*
*
* Copyright 201
2
Google Inc.
* Copyright 201
5
Google Inc.
* https://developers.google.com/blockly/
* https://developers.google.com/blockly/
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment