Skip to content

Conversation

jmbockhorst
Copy link
Member

@jmbockhorst jmbockhorst commented Mar 31, 2021

Refactor the compiler api so that it can be used as a standalone application by other projects.

Usage would look like

import { createProgram } from '@elm-tooling/elm-language-server';

const program = await createProgram(URI.parse('path-root-root-uri'));

const checker = program.getTypeChecker();
const sourceFile = program.getSourceFile('some-file-uri');

sourceFile.tree.rootNode.children.forEach((node) => {
	if (node.type === 'value_declaration') {
		const type = checker.findType(node);
	}
});

@jmbockhorst jmbockhorst added this to the 2.2 milestone Mar 31, 2021
@jmbockhorst jmbockhorst modified the milestones: 2.2, 2.3 Aug 31, 2021
@jmbockhorst jmbockhorst force-pushed the compiler-api branch 2 times, most recently from 6ec3d03 to 50b2132 Compare August 31, 2021 03:49
@razzeee razzeee modified the milestones: 2.3, Backlog Jan 8, 2022
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

Successfully merging this pull request may close these issues.

2 participants