Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve
Declare
node and introduce DeclareDirective
node
- Loading branch information
1 parent
940e0d0
commit a0338ae
Showing
11 changed files
with
594 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (C) 2018 Glayzzle (BSD3 License) | ||
* @authors https://github.com/glayzzle/php-parser/graphs/contributors | ||
* @url http://glayzzle.com | ||
*/ | ||
"use strict"; | ||
|
||
const Node = require("./node"); | ||
const KIND = "declaredirective"; | ||
|
||
/** | ||
* Defines a constant | ||
* @constructor DeclareDirective | ||
* @extends {Node} | ||
* @property {Identifier} name | ||
* @property {Node|string|number|boolean|null} value | ||
*/ | ||
module.exports = Node.extends(KIND, function DeclareDirective( | ||
key, | ||
value, | ||
docs, | ||
location | ||
) { | ||
Node.apply(this, [KIND, docs, location]); | ||
this.key = key; | ||
this.value = value; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.