nl_tokens: Process a new header creating a new section
pl_tokens: function takeHeader ( content , level , name ) { var currLevel = sectionStack . length if ( level > currLevel + 1 ) { throwSyntaxError ( 'Unexpected header level ' + level + ' on section level ' + currLevel ) } else if ( level === 1 ) { throwSyntaxError ( 'There can be only one header level 1, the first line of the file' ) } // Walk out sectionStack . length = level - 1 // Create section section = { type : 'section' , name : name || '' , line : line , size : 1 , content : <mask> , level : level , children : [ ] } sectionStack [ sectionStack . length - 1 ] . children . push ( section ) sectionStack . push ( section ) }