Giter Club home page Giter Club logo

puredit's Introduction

Project Overview

This repository extends the projectional code editor Puredit by Niklas Korz and Artur Andrzejak. The editor matches parametrized patterns against a GPL program and displays the matched parts as dynamically rendered widgets.

Detailed documentation of the project can be found in our wiki.

Installing the Visual Studio Code Extension

The preferred way to use the projectional editor is through our VS Code extension. To install and test the extension, proceed as follows:

  • Go to the latest release and download the asset test-project.zip.
  • Unpack the zip archive and open the unpacked folder in VS Code.
  • In the file explorer, right-click the .vsix file and select "Install Extension VSIX" from the context menu.
  • If you already had installed an older version of the extension, reload the VS Code window.
  • Right-click one of the .py files in the folder and select "Open with"
  • Select the "Projectional Python Editor" from the list.

The selected file should then open in the projectional editor. You can customize the projectional editor with your own projections as described in the section YAML- or JSON-based Projections of the documentation.

Testing the Projectional Editor in the Browser

To test the editor without any installation, please refer to puredit.atrump.de. There, we host an editor for TypeScript and Python with two test files to try out the projectional editing.

NOTE: Some features of the editor are only available in VS Code, e.g. customizing the editor your own projections.

Development

For instructions on developing projections and the editor itself, please refer to our wiki, especially the sections "For DSL Developers" and "For Framework Developers".

puredit's People

Contributors

andretrump avatar niklaskorz avatar arturhd avatar

puredit's Issues

Reimplement projection drafts

The feature to generate a draft from a projection was removed during the refactoring of the parser package. It must be reimplemented and extended such that also drafts for the sub-patterns of aggregations and chains can be generated.

Implement matching of chaining

Extend the pattern matching algorithm such that chained function calls can be matched.
Example: obj.my_func("foo").my_other_func(bar)

Read context from comments

Add an additional optional phase to the pattern matching where context information is read from a comment that is the previous sibling of the actually matching node.

Two forms of context shall be supported:

  • Lists: CONTEXT: [ value1, value2, ... ]
  • Key-Value-Pairs: CONTEXT: { key1: value1, key2: value2 }

Implement matching of aggregations

Currently, every combination of parameters of a function needs to be modelled as a separate projection
Example: df.select(pl.col("foo"), pl.col("bar") + 1, moo="boo", "zoo", ...)
Introduce a new kind of template argument that works similarly to the block node but inside statements.

Resolving of template parameters independent of IDs

Currently, template parameters are resolved in the transformation to the pattern tree by their ID and a certain form of identifier which limits strongly restricts the possibilities how to represent template parameters in the code string and also might lead to bugs when a pattern accidentally contains an identifier matching the pattern of the code string representation of parameters.

The template parameters should be resolved by their position (start index, end index) in the code string. This allows free representation of template parameters in the code string.

Context sensitive completions

If the cursor is placed inside the range of an aggregation, show only the allowed aggregation subpatterns as suggestions. If the suggestion is inserted, automatically add the delimiter token behind the suggestion if required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.