[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 238f967 76/96: Cleaned up lex function
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 238f967 76/96: Cleaned up lex function |
Date: |
Fri, 29 Oct 2021 11:14:54 -0400 (EDT) |
branch: externals/phps-mode
commit 238f967976e7dc45e9ffd4cb1abcfb67cac84760
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Cleaned up lex function
---
phps-mode-lex-analyzer.el | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index b8e00af..cb76e6b 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -34,6 +34,7 @@
(require 'phps-mode-lexer)
(require 'phps-mode-macros)
+(require 'phps-mode-parser)
(require 'phps-mode-serial)
(require 'semantic)
@@ -3124,7 +3125,7 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
(unless phps-mode-lex-analyzer--state
(setq phps-mode-lex-analyzer--state 'ST_INITIAL)))
-(defun phps-mode-lex-analyzer--lex-string (contents &optional start end states
state state-stack heredoc-label heredoc-label-stack nest-location-stack tokens)
+(defun phps-mode-lex-analyzer--lex-string (contents &optional start end states
state state-stack heredoc-label heredoc-label-stack nest-location-stack tokens
parse)
"Run lexer on CONTENTS."
;; Create a separate buffer, run lexer inside of it, catch errors and return
them
;; to enable nice presentation
@@ -3177,13 +3178,8 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
;; Run lexer or incremental lexer
(progn
(if (and start end)
- (let ((incremental-tokens (semantic-lex start end)))
- (setq
- phps-mode-lex-analyzer--tokens
- (append tokens incremental-tokens)))
- (setq
- phps-mode-lex-analyzer--tokens
- (semantic-lex-buffer)))
+ (semantic-lex start end)
+ (semantic-lex-buffer))
(setq got-error nil))
(when got-error
(kill-buffer))))
@@ -3196,7 +3192,13 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
(setq heredoc-label phps-mode-lexer--heredoc-label)
(setq heredoc-label-stack phps-mode-lexer--heredoc-label-stack)
(kill-buffer))))
- (list tokens states state state-stack heredoc-label heredoc-label-stack))
+ (list
+ tokens
+ states
+ state
+ state-stack
+ heredoc-label
+ heredoc-label-stack))
(provide 'phps-mode-lex-analyzer)
- [elpa] externals/phps-mode e698a2e 64/96: Re-generated parser with automated grammar, (continued)
- [elpa] externals/phps-mode e698a2e 64/96: Re-generated parser with automated grammar, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 128868c 75/96: Added another parse test, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode f44577a 79/96: More testing integrating parser and lex-analyzer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 7cfa35c 81/96: Improved error-reporting for parser errors, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 91b425f 73/96: Update of parsers lex-analyzer function to not depend on lexer buffer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 0f11914 83/96: Fixed lexer issue with wrong token for expressions inside double quoted strings, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 50c9b31 84/96: Added 2 TODO items, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c9f6fdb 82/96: Mode-line status now signals parser errors, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode e007ea7 88/96: Fixed parser-mode issue with parser and lex-analyzer integration, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode bc8306f 71/96: Fix in automation grammar to support exporting, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 238f967 76/96: Cleaned up lex function,
Christian Johansson <=
- [elpa] externals/phps-mode 5e375e3 80/96: Parser is not blocking lexer anymore, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 7b62779 86/96: Added another TODO item, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c5058c5 87/96: Fixed issue with async.el support for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 8e263fe 85/96: Removed T_DIE as token as it's replaced by T_EXIT, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 3489f9d 90/96: Parser parse function now ignores creating a SDT, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 620ec6e 91/96: Optimization of parser speed, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode ff25e3d 92/96: Removed obsolete files, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode aa691a8 89/96: Added parser and lexer integraction-fix to automation, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode daba241 93/96: Added another TODO item, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 95479f9 94/96: Updates of documentation, Christian Johansson, 2021/10/29