Home | History | Annotate | Download | only in docs

Lines Matching refs:decorations

541     *   function that takes source code and returns a list of decorations.
564 var decorations = [opt_basePos, PR_PLAIN];
601 decorations.push(opt_basePos + pos, style);
606 return decorations;
630 var decorations = PR_MARKUP_LEXER(source);
631 for (var i = 0; i < decorations.length; i += 2) {
632 if (decorations[i + 1] === PR_SOURCE) {
634 start = decorations[i];
635 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
641 decorations.splice(
649 return decorations;
666 function splitTagAttributes(source, decorations) {
667 for (var i = 0; i < decorations.length; i += 2) {
668 var style = decorations[i + 1];
671 start = decorations[i];
672 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
675 spliceArrayInto(subDecorations, decorations, i, 2);
679 return decorations;
682 /** returns a function that produces a list of decorations from source text.
775 function splitNonStringNonCommentTokens(source, decorations) {
776 for (var i = 0; i < decorations.length; i += 2) {
777 var style = decorations[i + 1];
780 start = decorations[i];
781 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
800 spliceArrayInto(subDecs, decorations, i, 2);
804 return decorations;
812 var decorations = splitStringAndCommentTokens(sourceCode);
815 decorations = splitNonStringNonCommentTokens(sourceCode, decorations);
817 return decorations;
833 function splitSourceNodes(source, decorations) {
834 for (var i = 0; i < decorations.length; i += 2) {
835 var style = decorations[i + 1];
839 start = decorations[i];
840 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
845 spliceArrayInto(subDecorations, decorations, i, 2);
849 return decorations;
856 function splitSourceAttributes(source, decorations) {
858 for (var i = 0; i < decorations.length; i += 2) {
859 var style = decorations[i + 1];
862 start = decorations[i];
863 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
867 start = decorations[i];
868 end = i + 2 < decorations.length ? decorations[i + 2] : source.length;
895 spliceArrayInto(attribSourceDecorations, decorations, i + 2, 0);
897 spliceArrayInto(attribSourceDecorations, decorations, i, 2);
903 return decorations;
940 var decorations = tokenizeMarkup(sourceCode);
941 decorations = splitTagAttributes(sourceCode, decorations);
942 decorations = splitSourceNodes(sourceCode, decorations);
943 decorations = splitSourceAttributes(sourceCode, decorations);
944 return decorations;
951 * @param {Array.<number|string>} decorations style classes preceded by their
956 function recombineTagsAndDecorations(sourceText, extractedTags, decorations) {
964 var decPos = 0; // index into decorations
1011 if (decPos < decorations.length) {
1015 outputTag = extractedTags[tagPos] <= decorations[decPos];
1032 } else if (decPos < decorations.length) {
1033 emitTextUpTo(decorations[decPos]);
1034 currentDecoration = decorations[decPos + 1];
1052 * a function from source code to a list of decorations.
1137 var decorations = langHandlerRegistry[opt_langExtension].call({}, source);
1139 // Integrate the decorations and tags back into the source code to produce
1141 return recombineTagsAndDecorations(source, extractedTags, decorations);