-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34a4bcc
commit 65ac9cd
Showing
4 changed files
with
77 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
'use strict' | ||
|
||
/* | ||
* edge | ||
* | ||
* (c) Harminder Virk <virk@adonisjs.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
const BaseTag = require('./BaseTag') | ||
|
||
/** | ||
* The debugger tag for runtime debugging | ||
* inside chrome dev tools. | ||
* | ||
* @class DebuggerTag | ||
* @extends {BaseTag} | ||
* @static | ||
*/ | ||
class DebuggerTag extends BaseTag { | ||
/** | ||
* Tag name to be used for registering | ||
* the tag | ||
* | ||
* @method tagName | ||
* | ||
* @return {String} | ||
*/ | ||
get tagName () { | ||
return 'debugger' | ||
} | ||
|
||
/** | ||
* Whether or not the tag is block level | ||
* tag. Which is no in this case. | ||
* | ||
* @method isBlock | ||
* | ||
* @return {Boolean} | ||
*/ | ||
get isBlock () { | ||
return false | ||
} | ||
|
||
/** | ||
* Compile the template | ||
* | ||
* @method compile | ||
* | ||
* @param {Object} compiler | ||
* @param {Object} lexer | ||
* @param {Object} buffer | ||
* @param {String} options.body | ||
* @param {Array} options.childs | ||
* @param {Number} options.lineno | ||
* | ||
* @return {void} | ||
*/ | ||
compile (compiler, lexer, buffer, { body, childs, lineno }) { | ||
buffer.writeLine('debugger') | ||
} | ||
|
||
/** | ||
* Nothing needs to be done in runtime | ||
* for debugger tag | ||
*/ | ||
run () { | ||
} | ||
} | ||
|
||
module.exports = DebuggerTag |
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