[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode d05601b 387/405: Updated documents
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode d05601b 387/405: Updated documents |
Date: |
Sat, 13 Jul 2019 10:00:58 -0400 (EDT) |
branch: externals/phps-mode
commit d05601b606ef4bf509e76ddf808f598cff54d3d2
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Updated documents
---
docs/heuristics.md | 2 ++
docs/imenu.md | 22 ++++++++++++++++++++++
docs/{indentation-algorithm.md => indentation.md} | 12 ++++++------
docs/todo.md | 2 ++
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/docs/heuristics.md b/docs/heuristics.md
new file mode 100644
index 0000000..90098f5
--- /dev/null
+++ b/docs/heuristics.md
@@ -0,0 +1,2 @@
+* When pressing return when line after cursor is only white-space
+* When pressing backspace when line before cursor is only white-space
diff --git a/docs/imenu.md b/docs/imenu.md
new file mode 100644
index 0000000..9bba396
--- /dev/null
+++ b/docs/imenu.md
@@ -0,0 +1,22 @@
+# Imenu algorithm
+
+## Description
+
+This file explains with psuedo-code how the imenu generation algorithm works.
+
+## Psuedo-code
+
+```
+for token in tokens:
+
+ if token is "{":
+ nesting-level + 1;
+ endif;
+ if token is "}":
+ nesting-level - 1;
+ endif;
+
+
+
+endfor;
+```
diff --git a/docs/indentation-algorithm.md b/docs/indentation.md
similarity index 95%
rename from docs/indentation-algorithm.md
rename to docs/indentation.md
index c6fd0be..012fcdd 100644
--- a/docs/indentation-algorithm.md
+++ b/docs/indentation.md
@@ -1,4 +1,4 @@
-# Indentation algorithm for PHP
+# Indentation algorithm
Document describing indentation algorithm.
@@ -13,7 +13,7 @@ Document describing indentation algorithm.
## Algorithm
-Here follows pseudo-code for a algorithm that calculates indentation for each
line in buffer.
+Here follows pseudo-code for a algorithm that calculates indentation for each
line in buffer. Tokens are from the official re2c PHP lexer.
```php
foreach token in buffer:
@@ -116,11 +116,11 @@ PHP examples using algorithms defined above, explained
each line.
## Basic multi-line if-expression 1
-```php // #save indent: 0
+```php // #save indent: 0
if (function( // #save indent: 0, #increase push (0 2) indent: 1
- false) // #save indent: 1
+ false) // #save indent: 1
) { // #decrease pop (0 2) indent: 0, #save indent:
0, #increase push (0 1) indent: 1
- echo true; // #save indent: 1
+ echo true; // #save indent: 1
} // #decrease pop (0 1) indent: 0, #save
indent: 0
```
@@ -163,7 +163,7 @@ endif; // #decrease
pop (0 1) indent: 0, #save indent: 0
<?php // #save indent: 0
$var = array( // #save indent: 0, #increase push (0 2) indent: 1
'def' // #save indent: 1
-); // #decrease pop (0 2) indent: 0, #save
indent: 0
+); // #decrease pop (0 2) indent: 0, #save indent: 0
```
## Multi-line assignments 2
diff --git a/docs/todo.md b/docs/todo.md
new file mode 100644
index 0000000..822eef7
--- /dev/null
+++ b/docs/todo.md
@@ -0,0 +1,2 @@
+* Also format white-space inside the line, i.e. after function declarations?
+* Fix imenu with multiple namespaces
- [elpa] externals/phps-mode 7deefdc 383/405: Fixed use-package config example in README, (continued)
- [elpa] externals/phps-mode 7deefdc 383/405: Fixed use-package config example in README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 65f79c8 397/405: Added map shortcuts for comment / uncomment region, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dbd2825 389/405: Added unit test for multiple level namespaces and added support for it, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5f52f54 395/405: Fixed compilation warning after new imenu structure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 192f9ae 391/405: Fix issues with test list structure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 21f883e 396/405: Updated README and copyright date, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f0912ee 398/405: Removed TODO and changed syntax color to be based on tokens only, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 47793f7 402/405: Updated README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2d2aaad 388/405: Added failing unit test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode fa47a17 390/405: Changed imenu index to a hierarchical structure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d05601b 387/405: Updated documents,
Stefan Monnier <=
- [elpa] externals/phps-mode 07d9176 403/405: Improved flycheck support, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1d58896 400/405: Minimal mode map is now loaded, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 11e151a 382/405: Fixed linting issues in flycheck file, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 808f679 401/405: Moved TODO to separate doc and improved syntax coloring, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f5c2072 405/405: Updated copyright for inclusion in ELPA, Stefan Monnier, 2019/07/13