Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

character-escape.js 713B

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict'
  2. var asciiPunctuation = require('../character/ascii-punctuation.js')
  3. var characterEscape = {
  4. name: 'characterEscape',
  5. tokenize: tokenizeCharacterEscape
  6. }
  7. function tokenizeCharacterEscape(effects, ok, nok) {
  8. return start
  9. function start(code) {
  10. effects.enter('characterEscape')
  11. effects.enter('escapeMarker')
  12. effects.consume(code)
  13. effects.exit('escapeMarker')
  14. return open
  15. }
  16. function open(code) {
  17. if (asciiPunctuation(code)) {
  18. effects.enter('characterEscapeValue')
  19. effects.consume(code)
  20. effects.exit('characterEscapeValue')
  21. effects.exit('characterEscape')
  22. return ok
  23. }
  24. return nok(code)
  25. }
  26. }
  27. module.exports = characterEscape