Common Bits Of Code

Peter Boughton edited this page Jan 18, 2012 · 1 revision

Here are some of the most interesting bits of code.

The parser does most the heavy lifting for parsing code. There are some other parsers, but this is the big boy. It takes

It handles several key elements of the editor:

Document parsing

Creates the document parse tree (checks that every has an , and turns tags into objects (DocItem) for use with the editor).

Attribute parsing

the regular expressing : (\w+)[\s?=\s?]+?((((\w+ & )?\x22|\x27|#)((?!\4).|\4[{2}](/report/2))*\4?(.*&.*)?))

Given <cfblah fun="yes" whack=#no# cool = 'beans' />, we should get back 3 attributes with values.

If you change it (QuickREx is the bestest regular expression editor) be sure to update the un-escaped regex in the comments please (QuickREx exports java- escaped expressions, but doesn't seem to import them). See the stripAttributes() function for use.

More later...

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.