Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider the possibility to share some code with texlab #187

Open
XVilka opened this issue Nov 14, 2019 · 1 comment
Open

Consider the possibility to share some code with texlab #187

XVilka opened this issue Nov 14, 2019 · 1 comment

Comments

@XVilka
Copy link

XVilka commented Nov 14, 2019

TexLab it the LSP implementation for TeX/LaTeX, so some kind of integration and code sharing (not sure about this point, but you might know better) is probably possible.

image

@cormacrelf
Copy link
Collaborator

cormacrelf commented Nov 14, 2019

I'm not sure that's really feasible. I'm very slowly becoming familiar, but my impression is XeTeX doesn't work like a familiar code compiler. It doesn't have distinct parsing and IR/optimising stages; I think the engine reads a token and processes it immediately. (Or at least it only tokenizes and then executes token streams, not any higher level structure.) So if you wanted the reusability of e.g. the syn crate for Rust code, then no dice. If you wanted to know whether commands are defined or not and what arguments they accept, then not really no, that's a highly dynamic concept that changes from line to line. The engine does virtually no static analysis, so there is no static analysis we can carve out and make reusable. You can feel this is intuitively true because all the TeX errors you ever get are 'bailing out midway because this input does not make sense given what I've already processed', with debug dumps of varying degrees of effort trying to map the current engine state back to what you typed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants