Git Product home page Git Product logo

dwscriptexpert's Introduction

DWScriptExpert

DWScript Expert is a Delphi IDE expert to add the power of DWScript to the Delphi IDE

There are times during the development with the Delphi IDE, that a more extensive script language is needed. For example it's sometimes not enough to perform a replace operation and even the keyboard macro recorder might be not flexible enough. In my case I wanted to delete all occurences of '_' in function names and instead make the following character upperspace, so that 'Some_function' becomes 'SomeFunction'. At the same time this should not be performed for strings (e.g. in C library imported names). With the power of the DelphiAST project, however, it's possible to understand the Delphi code and with this, it's possible to iterate only over functions. I could have written a dedicated expert for this, but I wanted something more general.

With the DWScript Expert it's possible to outsource the expert code to scripts, that can easily be loaded on demand.

It's also possible to write scripts to perform some calculations, which might be too heavy for a calculator. Such as spit out all prime numbers below 100, etc.

This expert is under the Mozilla Public License Version 1.1 and far from being complete. The internal API will be expanded one by one, so either help out, or be patient if a feature you'd like to use is missing.

What works so far (beyond everything that inhertis from DWScript) are simple things like:

  • SetCursorPosition(Line, Column: Integer)
  • LocateText(Pattern: String)
  • ReplaceAll(Pattern, ReplaceText: String)
  • SelectCurrentWord
  • MoveOneWordRight/Left ([CTRL] + RightArrow/LeftArrow)

Also with the power of DelphiAST it's also possible to iterate through the abstract syntax tree of the active unit.

dwscriptexpert's People

Contributors

cwbudde avatar

Watchers

Me avatar

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.