Skip to content

Commit

Permalink
scalar -> compound (дурацкое слово, как бы правильно назвать блок в с…
Browse files Browse the repository at this point in the history
…кобках?)
  • Loading branch information
pasaran committed May 21, 2012
1 parent ce4b7d7 commit 1a19283
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions lib/asts.js
Expand Up @@ -1291,21 +1291,21 @@ asts.root.isLocal = common.false;

// --------------------------------------------------------------------------------------------------------------- //

asts.scalar = {};
asts.compound = {};

asts.scalar._getType = function() {
asts.compound._getType = function() {
return this.Block.type();
};

asts.scalar.oncast = function(to) {
asts.compound.oncast = function(to) {
this.Block.cast(to);
};

asts.scalar.closes = function() {
asts.compound.closes = function() {
return this.Block.closes();
};

asts.scalar.setPrevOpened = function(prevOpened) {
asts.compound.setPrevOpened = function(prevOpened) {
this.Block.setPrevOpened(prevOpened);
};

Expand Down
8 changes: 4 additions & 4 deletions lib/grammar.js
Expand Up @@ -295,7 +295,7 @@ rules.var_ = function(ast) {
// Block expressions
// --------------------------------------------------------------------------------------------------------------- //

// block_expr := if_ | for_ | apply | attr | xml_line | array | object | pair | scalar
// block_expr := if_ | for_ | apply | attr | xml_line | array | object | pair | compound

rules.block_expr = function() {
var r;
Expand All @@ -317,7 +317,7 @@ rules.block_expr = function() {
} else if (this.test('pair')) {
r = this.match('pair');
} else {
r = this.match('scalar');
r = this.match('compound');
}

return r;
Expand Down Expand Up @@ -432,9 +432,9 @@ rules.pair = function(ast) {

// --------------------------------------------------------------------------------------------------------------- //

// scalar := inline_expr | '(' block ')'
// compound := inline_expr | '(' block ')'

rules.scalar = function(ast) {
rules.compound = function(ast) {
if (this.test('inline_expr')) {
return this.match('inline_expr');
} else {
Expand Down
2 changes: 1 addition & 1 deletion templates/js.tmpl
Expand Up @@ -287,7 +287,7 @@ attrs_open :output

// ----------------------------------------------------------------------------------------------------------------- //

scalar :output
compound :output

%{ Block :output }

Expand Down
2 changes: 1 addition & 1 deletion templates/yate.tmpl
Expand Up @@ -198,7 +198,7 @@ string_literal

// ----------------------------------------------------------------------------------------------------------------- //

scalar
compound
(
%{ Block }
)
Expand Down

0 comments on commit 1a19283

Please sign in to comment.