Skip to content

Commit eb955fa

Browse files
gjtorikiannightwing
authored andcommitted
Save changes
1 parent 0739444 commit eb955fa

18 files changed

Lines changed: 15475 additions & 1274 deletions

api/api.json

Lines changed: 14340 additions & 25 deletions
Large diffs are not rendered by default.

doc/build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var fs = require("fs");
22
var path = require("path");
33
var panino = require("panino");
44
var srcPath = __dirname + "/../lib/ace";
5+
var buildType = process.argv.splice(2)[0];buildType
56

67
var options = {
78
title : "Ace API",
@@ -46,7 +47,7 @@ panino.parse(files, options, function (err, ast) {
4647
process.exit(1);
4748
}
4849

49-
panino.render('json', ast, options, function (err) {
50+
panino.render(buildType || 'html', ast, options, function (err) {
5051
if (err) {
5152
console.error(err);
5253
process.exit(1);

lib/ace/anchor.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
3636

3737
/**
3838
*
39-
* Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
39+
* Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated.
4040
*
4141
* @class Anchor
4242
**/
4343

4444
/**
45-
* new Anchor(doc, row, column)
45+
* Creates a new `Anchor` and associates it with a document.
46+
*
4647
* @param {Document} doc The document to associate with the anchor
4748
* @param {Number} row The starting row position
4849
* @param {Number} column The starting column position
4950
*
50-
* Creates a new `Anchor` and associates it with a document.
51-
*
51+
* @constructor
5252
**/
5353

5454
var Anchor = exports.Anchor = function(doc, row, column) {
@@ -69,7 +69,7 @@ var Anchor = exports.Anchor = function(doc, row, column) {
6969

7070
/**
7171
* Returns an object identifying the `row` and `column` position of the current anchor.
72-
* @returns Object
72+
* @returns {Object}
7373
**/
7474

7575
this.getPosition = function() {
@@ -79,23 +79,25 @@ var Anchor = exports.Anchor = function(doc, row, column) {
7979
/**
8080
*
8181
* Returns the current document.
82-
* @returns Document
82+
* @returns {Document}
8383
**/
8484

8585
this.getDocument = function() {
8686
return this.document;
8787
};
8888

8989
/**
90-
* @event change
91-
* @param {Object} e An object containing information about the anchor position. It has two properties:
92-
- `old`: An object describing the old Anchor position
93-
- `value`: An object describing the new Anchor position
94-
* Both of these objects have a `row` and `column` property corresponding to the position.
95-
*
9690
* Fires whenever the anchor position changes.
9791
*
92+
* Both of these objects have a `row` and `column` property corresponding to the position.
93+
*
9894
* Events that can trigger this function include [[Anchor.setPosition `setPosition()`]].
95+
*
96+
* @event change
97+
* @param {Object} e An object containing information about the anchor position. It has two properties:
98+
* - `old`: An object describing the old Anchor position
99+
* - `value`: An object describing the new Anchor position
100+
*
99101
*
100102
**/
101103

@@ -165,12 +167,12 @@ var Anchor = exports.Anchor = function(doc, row, column) {
165167
};
166168

167169
/**
168-
* Anchor.setPosition(row, column, noClip)
170+
* Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
169171
* @param {Number} row The row index to move the anchor to
170172
* @param {Number} column The column index to move the anchor to
171173
* @param {Boolean} noClip Identifies if you want the position to be clipped
172174
*
173-
* Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
175+
*
174176
*
175177
**/
176178

@@ -212,11 +214,11 @@ var Anchor = exports.Anchor = function(doc, row, column) {
212214
};
213215

214216
/**
215-
* Anchor.clipPositionToDocument(row, column)
217+
* Clips the anchor position to the specified row and column.
216218
* @param {Number} row The row index to clip the anchor to
217219
* @param {Number} column The column index to clip the anchor to
218220
*
219-
* Clips the anchor position to the specified row and column.
221+
*
220222
*
221223
**/
222224
this.$clipPositionToDocument = function(row, column) {

lib/ace/background_tokenizer.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,23 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
3838
var MAX_LINE_LENGTH = 5000;
3939

4040
/**
41-
* @class BackgroundTokenizer
41+
*
4242
*
4343
* Tokenizes the current [[Document `Document`]] in the background, and caches the tokenized rows for future use.
4444
*
4545
* If a certain row is changed, everything below that row is re-tokenized.
4646
*
47+
* @class BackgroundTokenizer
4748
**/
4849

4950
/**
50-
* new BackgroundTokenizer(tokenizer, editor)
51+
* Creates a new `BackgroundTokenizer` object.
5152
* @param {Tokenizer} tokenizer The tokenizer to use
5253
* @param {Editor} editor The editor to associate with
5354
*
54-
* Creates a new `BackgroundTokenizer` object.
55-
*
56-
*
55+
*
56+
*
57+
* @constructor
5758
**/
5859

5960
var BackgroundTokenizer = function(tokenizer, editor) {
@@ -100,10 +101,10 @@ var BackgroundTokenizer = function(tokenizer, editor) {
100101
oop.implement(this, EventEmitter);
101102

102103
/**
103-
* @param {Tokenizer} tokenizer The new tokenizer to use
104-
*
105104
* Sets a new tokenizer for this object.
106105
*
106+
* @param {Tokenizer} tokenizer The new tokenizer to use
107+
*
107108
**/
108109
this.setTokenizer = function(tokenizer) {
109110
this.tokenizer = tokenizer;
@@ -114,10 +115,8 @@ var BackgroundTokenizer = function(tokenizer, editor) {
114115
};
115116

116117
/**
117-
* @param {Document} doc The new document to associate with
118-
*
119118
* Sets a new document to associate with this object.
120-
*
119+
* @param {Document} doc The new document to associate with
121120
**/
122121
this.setDocument = function(doc) {
123122
this.doc = doc;
@@ -128,18 +127,17 @@ var BackgroundTokenizer = function(tokenizer, editor) {
128127
};
129128

130129
/**
130+
* Fires whenever the background tokeniziers between a range of rows are going to be updated.
131+
*
131132
* @event update
132133
* @param {Object} e An object containing two properties, `first` and `last`, which indicate the rows of the region being updated.
133134
*
134-
* Fires whenever the background tokeniziers between a range of rows are going to be updated.
135-
*
136135
**/
137136
/**
137+
* Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated.
138138
* @param {Number} firstRow The starting row region
139139
* @param {Number} lastRow The final row region
140140
*
141-
* Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated.
142-
*
143141
**/
144142
this.fireUpdateEvent = function(firstRow, lastRow) {
145143
var data = {
@@ -150,10 +148,10 @@ var BackgroundTokenizer = function(tokenizer, editor) {
150148
};
151149

152150
/**
153-
* @param {Number} startRow The row to start at
154-
*
155151
* Starts tokenizing at the row indicated.
156152
*
153+
* @param {Number} startRow The row to start at
154+
*
157155
**/
158156
this.start = function(startRow) {
159157
this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());
@@ -202,19 +200,21 @@ var BackgroundTokenizer = function(tokenizer, editor) {
202200
};
203201

204202
/**
203+
* Gives list of tokens of the row. (tokens are cached)
204+
*
205205
* @param {Number} row The row to get tokens at
206206
*
207-
* Gives list of tokens of the row. (tokens are cached)
207+
*
208208
*
209209
**/
210210
this.getTokens = function(row) {
211211
return this.lines[row] || this.$tokenizeRow(row);
212212
};
213213

214214
/**
215-
* @param {Number} row The row to get state at
216-
*
217215
* [Returns the state of tokenization at the end of a row.]{: #BackgroundTokenizer.getState}
216+
*
217+
* @param {Number} row The row to get state at
218218
**/
219219
this.getState = function(row) {
220220
if (this.currentLine == row)

0 commit comments

Comments
 (0)