/***/

// After finding a start of a string ('|") this function attempts to find the end;

// Are we in a definition (class, node, define)?

// Are we in an 'include' statement?

// CodeMirror, copyright (c) by Marijn Haverbeke and others

// CommonJS

// Distributed under an MIT license: https://codemirror.net/5/LICENSE

// Do we have Puppet specific words?

// Do we just have a function on our hands?

// Go through the main process

// Have we found a string?

// Have we found a variable?

// Have we matched the prior attribute regex?

// Have we matched the prior resource regex?

// Have we matched the prior special_resource regex?

// If a variable is encountered along the way, we display it differently when it

// If so, go through the loop again

// If so, return def (i.e. for 'class myclass {' ; 'myclass' would be matched)

// In 'ensure_resource("myclass")', 'ensure_resource' is matched

// Is there a match on a reference?

// Keep advancing through all the rest

// Main function

// Match all the brackets

// Match all the comments. All of them.

// Match all the numbers

// Match and return the included class

// Match characters that we are going to assume

// Match the '=' and '=>' operators

// Match the full reference

// Match the rest it the next time around

// Matches attributes (i.e. ensure => present ; 'ensure' would be matched)

// Matches one whole word

// Negate the next()

// Negates the initial next()

// Otherwise return an invalid variable

// Should we still be looking for the end of a string?

// Start it all

// Store the type (single or double)

// Stores the words from the define method

// Strip the spaces, but regex will account for them eitherway

// Taken, mostly, from the Puppet official variable standards regex

// Takes a string of words separated by spaces and adds them as

// Takes commonly known puppet types/words and classifies them to a style

// We want to process these words differently

// are trying to be regex

// do to the importance they have in Puppet

// is encapsulated in a double-quoted string.

// keys with the value of the first argument 'style'

// rs move the stream
