Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

374 lines (359 sloc) 25.351 kb
<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ace API - token_iterator</title>
<meta name="generator" content="c9-doc-build">
<meta name="description" content="Ace API documentation for the online code editor.">
<meta name="author" content="Garen J. Torikian">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="./resources/csses/bootstrap.min.css">
<link rel="stylesheet" href="./resources/csses/prettify.css">
<link rel="stylesheet" href="./resources/csses/ace_api.css">
<link href="./resources/images/favicon.ico" rel="icon" type="image/x-icon">
<script src="./resources/javascripts/jquery.js"></script>
<script src="./resources/javascripts/clicker.js"></script>
<script src="./resources/javascripts/jquery.collapse.js"></script>
<script src="./resources/javascripts/jquery.cookie.js"></script>
<script src="./resources/javascripts/bootstrap-dropdown.js"></script>
<script src="./resources/javascripts/jquery-scrollspy.js"></script>
<script script src="./resources/javascripts/prettify-extension.js"></script>
</head>
<body>
<div id="nonFooter">
<div id="wrapper">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container"><span class="brand"></span>
<ul class="nav topLinks">
<li id="ace_site"><a href="../index.html">Ace</a></li>
<li id="ace_api" class="active"><a href="index.html">Ace API Reference</a></li>
</ul>
<form id="searchbox" action="" class="navbar-search pull-right">
<input name="query" type="text" placeholder="Search the API" title="Search across all the documentation" class="search-query span3">
</form>
</div>
</div>
</div>
<header class="filler"></header>
<div class="container">
<div class="content">
<div class="row centerpiece">
<div class="span3 offset6 sidebarContainer">
<div id="sidebar">
<div id="well">
<h3>Ace Reference</h3>
<div class="swirl_divider"> </div>
<ul class="menu">
<li>
<div class="menu-item"><a href="ace.html" class="menuLink namespace">Ace</a></div>
</li>
<li>
<div class="menu-item"><a href="anchor.html" class="menuLink namespace">Anchor</a></div>
</li>
<li>
<div class="menu-item"><a href="background_tokenizer.html" class="menuLink namespace">BackgroundTokenizer </a></div>
</li>
<li>
<div class="menu-item"><a href="document.html" class="menuLink namespace">Document </a></div>
</li>
<li>
<div class="menu-item"><a href="edit_session.html" class="menuLink namespace">EditSession </a></div>
</li>
<li>
<div class="menu-item"><a href="editor.html" class="menuLink namespace">Editor</a></div>
</li>
<li>
<div class="menu-item"><a href="range.html" class="menuLink namespace">Range</a></div>
</li>
<li>
<div class="menu-item"><a href="scrollbar.html" class="menuLink namespace">Scrollbar</a></div>
</li>
<li>
<div class="menu-item"><a href="search.html" class="menuLink namespace">Search </a></div>
</li>
<li>
<div class="menu-item"><a href="selection.html" class="menuLink namespace">Selection </a></div>
</li>
<li>
<div class="menu-item"><a href="token_iterator.html" class="menuLink namespace">TokenIterator</a></div>
</li>
<li>
<div class="menu-item"><a href="tokenizer.html" class="menuLink namespace">Tokenizer</a></div>
</li>
<li>
<div class="menu-item"><a href="undomanager.html" class="menuLink namespace">UndoManager</a></div>
</li>
<li>
<div class="menu-item"><a href="virtual_renderer.html" class="menuLink namespace">VirtualRenderer</a></div>
</li>
</ul>
</div>
</div>
</div>
<div class="span9 mainContent">
<div id="documentation">
<div class="classContent">
<div class="membersBackground"></div>
<div class=" members pos0">
<div class=" membersContent pos0">
<h1 class="memberHeader"><span class="name">TokenIterator<span class="editInC9"><a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a></span></span>
</h1>
<ul data-tabs="tabs" class="nav tabs pos0">
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Constructors (1)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li data-id="new TokenIterator" class="memberLink"><a href="#TokenIterator.new" class="" title="new TokenIterator (constructor)" data-id="new TokenIterator">new</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><span>Functions (5)</span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li data-id="TokenIterator.getCurrentToken" class="memberLink"><a href="#TokenIterator.getCurrentToken" class="" title="TokenIterator.getCurrentToken (class method)" data-id="TokenIterator.getCurrentToken">getCurrentToken</a>
</li>
<li data-id="TokenIterator.getCurrentTokenColumn" class="memberLink"><a href="#TokenIterator.getCurrentTokenColumn" class="" title="TokenIterator.getCurrentTokenColumn (class method)" data-id="TokenIterator.getCurrentTokenColumn">getCurrentTokenColumn</a>
</li>
<li data-id="TokenIterator.getCurrentTokenRow" class="memberLink"><a href="#TokenIterator.getCurrentTokenRow" class="" title="TokenIterator.getCurrentTokenRow (class method)" data-id="TokenIterator.getCurrentTokenRow">getCurrentTokenRow</a>
</li>
<li data-id="TokenIterator.stepBackward" class="memberLink"><a href="#TokenIterator.stepBackward" class="" title="TokenIterator.stepBackward (class method)" data-id="TokenIterator.stepBackward">stepBackward</a>
</li>
<li data-id="TokenIterator.stepForward" class="memberLink"><a href="#TokenIterator.stepForward" class="" title="TokenIterator.stepForward (class method)" data-id="TokenIterator.stepForward">stepForward</a>
</li>
</ul>
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
<li data-dropdown="dropdown" class="dropdown">
</li>
</ul>
</div>
</div>
<article id="TokenIterator" data-title="TokenIterator (class)" class="article">
<div class="section description">
<div class="memberContent"><p>This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.</p>
</div>
</div>
</article>
<h3 class="sectionHeader">Constructors</h3>
<article id="TokenIterator.new" data-title="new TokenIterator (constructor)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span class="constructorIdentifier">new </span><span id="new TokenIterator" class="member-name methodClicker">TokenIterator</span>(<span class="sigArgList"><a href="edit_session.html#EditSession" class="argument methodClicker" title="EditSession (class)" data-id="EditSession">EditSession</a> session, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> initialRow, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> initialColumn</span>)</li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_new TokenIterator" class="ellipsis_description"><p>Creates a new token iterator object. The inital token index is set to the provided row and column coordinates. ...</p>
</div>
<div id="short_new TokenIterator" class="short_description hiddenSpan"><p>Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.</p>
</div>
<h3 id="new TokenIterator" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">session</td><td class="argType" "><a href="edit_session.html#EditSession" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription ">Required. The session to associate with</td></tr><tr class="argumentRow "><td class="argName ">initialRow</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The row to start the tokenizing at</td></tr><tr class="argumentRow "><td class="argName ">initialColumn</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The column to start the tokenizing at</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<h3 class="sectionHeader">Methods</h3>
<article id="TokenIterator.getCurrentToken" data-title="TokenIterator.getCurrentToken (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="TokenIterator.getCurrentToken" class="member-name methodClicker"><span class="sigClassName">TokenIterator.</span><span class="sigMemberName">getCurrentToken</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_TokenIterator.getCurrentToken" class="ellipsis_description"><p>Returns the current tokenized string. ...</p>
</div>
<div id="short_TokenIterator.getCurrentToken" class="short_description hiddenSpan"><p>Returns the current tokenized string.</p>
</div>
<h3 id="TokenIterator.getCurrentToken" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="TokenIterator.getCurrentTokenColumn" data-title="TokenIterator.getCurrentTokenColumn (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="TokenIterator.getCurrentTokenColumn" class="member-name methodClicker"><span class="sigClassName">TokenIterator.</span><span class="sigMemberName">getCurrentTokenColumn</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_TokenIterator.getCurrentTokenColumn" class="ellipsis_description"><p>Returns the current column. ...</p>
</div>
<div id="short_TokenIterator.getCurrentTokenColumn" class="short_description hiddenSpan"><p>Returns the current column.</p>
</div>
<h3 id="TokenIterator.getCurrentTokenColumn" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="TokenIterator.getCurrentTokenRow" data-title="TokenIterator.getCurrentTokenRow (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="TokenIterator.getCurrentTokenRow" class="member-name methodClicker"><span class="sigClassName">TokenIterator.</span><span class="sigMemberName">getCurrentTokenRow</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_TokenIterator.getCurrentTokenRow" class="ellipsis_description"><p>Returns the current row. ...</p>
</div>
<div id="short_TokenIterator.getCurrentTokenRow" class="short_description hiddenSpan"><p>Returns the current row.</p>
</div>
<h3 id="TokenIterator.getCurrentTokenRow" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
<article id="TokenIterator.stepBackward" data-title="TokenIterator.stepBackward (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="TokenIterator.stepBackward" class="member-name methodClicker"><span class="sigClassName">TokenIterator.</span><span class="sigMemberName">stepBackward</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type">[ <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a> ]</li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_TokenIterator.stepBackward" class="ellipsis_description"><p>Tokenizes all the items from the current point to the row prior in the document. ...</p>
</div>
<div id="short_TokenIterator.stepBackward" class="short_description hiddenSpan"><p>Tokenizes all the items from the current point to the row prior in the document.</p>
</div>
<h3 id="TokenIterator.stepBackward" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
<h4>Returns</h4><table class="returnTable return-list table table-striped table-bordered"><tr class=" "><td class="returnType "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="returnDescription ">If the current point is not at the top of the file, this function returns <code>null</code>. Otherwise, it returns an array of the tokenized strings.</td></tr></table>
</div>
</div>
</div>
</div>
</article>
<article id="TokenIterator.stepForward" data-title="TokenIterator.stepForward (class method)" class="article">
<div class="section method">
<div class="memberContent">
<div class="title">
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span id="TokenIterator.stepForward" class="member-name methodClicker"><span class="sigClassName">TokenIterator.</span><span class="sigMemberName">stepForward</span></span>(<span class="sigArgList"></span>)
<li class="signature-returns">
<ul class="argument-types">
<li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li>
</ul>
</li></li>
</ul>
<ul class="metaInfo">
</ul>
</li>
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_TokenIterator.stepForward" class="ellipsis_description"><p>Tokenizes all the items from the current point until the next row in the document. If the current point is at the en...</p>
</div>
<div id="short_TokenIterator.stepForward" class="short_description hiddenSpan"><p>Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns <code>null</code>. Otherwise, it returns the tokenized string.</p>
</div>
<h3 id="TokenIterator.stepForward" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3>
<div class="description">
</div>
</div>
</div>
</div>
</article>
</div>
</div>
<div id="disqus_thread"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer id="footer">
<div class="container">
<div class="footer-text pull-right">
<p><a href="http://www.c9.io">About Cloud9</a> | Ace & Cloud9 IDE are &copy; <a href="http://ajax.org">Ajax.org</a> 2012</p>
</div>
</div>
</footer>
<!-- scripts concatenated and minified via ant build script--><script defer src="./resources/javascripts/plugins.js"></script>
<script defer src="./resources/javascripts/prettify.js"></script>
<script defer src="./resources/javascripts/prettify-extension.js"></script>
<script defer src="./resources/javascripts/ux.js"></script>
<script defer src="./resources/javascripts/disqus-ext.js"></script>
<script defer src="./resources/javascripts/ga.js"></script>
<!-- end scripts--><!--[if lt IE 7]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>
window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
</script><![endif]-->
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.