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

cmd/scriggo: support transformation of package-less programs into programs #251

Closed
zapateo opened this issue Aug 2, 2019 · 1 comment
Closed
Labels
improvement An optional improvement

Comments

@zapateo
Copy link
Member

zapateo commented Aug 2, 2019

Implement a tool that, given:

  • a Scriggofile
  • a Scriggo script

generates a program source code that is 100% compatible with Go.

The Scriggofile must have a limitation: packages imported using main cannot have uncapitalize or selective importing. This allow to transform

IMPORT mypkg AS MAIN

into

import . "mypkg"

The script source code must be transformed in the following ways:

  • it's content must be encapsulated into a main function into a main package
  • functions defined using the script syntax must be converted to function literals assigned to variables
  • if the last statement of the script is an expression statement not valid in Go, such expression must be assigned to the blank identifier
@zapateo zapateo added the improvement An optional improvement label Aug 2, 2019
@gazerro gazerro added this to the Milestone 2 milestone Aug 17, 2019
@zapateo zapateo changed the title cmd/scriggo: support transformation of scripts into programs cmd/scriggo: support transformation of package-less programs into programs Jan 8, 2020
@gazerro gazerro removed this from the Milestone 2 milestone Jun 9, 2021
@gazerro
Copy link
Member

gazerro commented Jul 5, 2022

Support for scripts has been removed in the commit f423f04. Close this issue.

@gazerro gazerro closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An optional improvement
Projects
None yet
Development

No branches or pull requests

2 participants